Browse Source

Correct the UpperCase and LowerCase issue.

Felix 3 years ago
parent
commit
730b2bdc2f
1 changed files with 6 additions and 6 deletions
  1. 6 6
      ModeType.cs

+ 6 - 6
ModeType.cs

@@ -168,28 +168,28 @@ namespace FlutterCodeGenerator
                 }
                 else if (child is ListModelType listModelType)
                 {
-                    if (this is UserDefinedGenericComplexModelType type)//List��Dictionary �����ڸ����
+                    if (this is UserDefinedGenericComplexModelType type)
                     {
                         if (type.GenericArgumentModelType.ParameterType == listModelType.GenericArgumentModelType.ParameterType)
                         {
                             source.AppendLine($"\t\tList<T> {listModelType.Name_Lower}List = [];");
-                            source.AppendLine($"\t\tif (map['{listModelType.Name_Lower}'] != null) {{");
+                            source.AppendLine($"\t\tif (map['{listModelType.Name_Upper}'] != null) {{");
                             source.AppendLine($"\t\t\t{listModelType.Name_Lower}List.addAll(");
-                            source.AppendLine($"\t\t\t\t\t(map['{listModelType.Name_Lower}'] as List).map((e) => FJsonConvert.fromJson<T>(e)!));");
+                            source.AppendLine($"\t\t\t\t\t(map['{listModelType.Name_Upper}'] as List).map((e) => FJsonConvert.fromJson<T>(e)!));");
                             source.AppendLine($"\t\t}}");
                         }
                     }
                 }
                 else if (child is UserDefinedGenericComplexModelType userDefinedGenericComplexModelType)
                 {
-                    if (this is UserDefinedGenericComplexModelType type)//List��Dictionary �����ڸ����
+                    if (this is UserDefinedGenericComplexModelType type)
                     {
                         if (type.GenericArgumentModelType.ParameterType == userDefinedGenericComplexModelType.GenericArgumentModelType.ParameterType)
                         {
                             source.AppendLine($"\t\tList<T> {userDefinedGenericComplexModelType.Name_Lower}List = [];");
-                            source.AppendLine($"\t\tif (map['{userDefinedGenericComplexModelType.Name_Lower}'] != null) {{");
+                            source.AppendLine($"\t\tif (map['{userDefinedGenericComplexModelType.Name_Upper}'] != null) {{");
                             source.AppendLine($"\t\t\t{userDefinedGenericComplexModelType.Name_Lower}List.addAll(");
-                            source.AppendLine($"\t\t\t\t\t(map['{userDefinedGenericComplexModelType.Name_Lower}'] as List).map((e) => FJsonConvert.fromJson<T>(e)!));");
+                            source.AppendLine($"\t\t\t\t\t(map['{userDefinedGenericComplexModelType.Name_Upper}'] as List).map((e) => FJsonConvert.fromJson<T>(e)!));");
                             source.AppendLine($"\t\t}}");
                         }
                     }