|
@@ -142,6 +142,10 @@ namespace FlutterCodeGenerator.ModelTypes
|
|
|
{
|
|
|
source.AppendLine($"\t\t\t{child.Name_Lower}: {child.Name_Lower}Data != null ? ({child.Name_Lower}Data as List).map((e) => e as {child.ParameterType.Name.Replace("[]", string.Empty)}).toList(): null,");
|
|
|
}
|
|
|
+ else if (modelType is SimpleModelType)
|
|
|
+ {
|
|
|
+ source.AppendLine($"\t\t\t{child.Name_Lower}: map['{child.Name_Lower}']?.cast<{child.ParameterType.Name.Replace("[]", string.Empty)}>().toList(),");
|
|
|
+ }
|
|
|
else
|
|
|
{
|
|
|
source.AppendLine($"\t\t\t{child.Name_Lower}: {child.Name_Lower}Data != null ? ({child.Name_Lower}Data as List).map((e) => {child.ParameterType.Name.Replace("[]", string.Empty)}.fromJson(e)).toList(): null,");
|