|
@@ -34,6 +34,18 @@ namespace FlutterCodeGenerator.ModelTypes
|
|
|
DefaultValue = $"{GetFlutterTypeName()}.{firstChildName}";
|
|
|
}
|
|
|
|
|
|
+ public override string GetFlutterTypeName(bool isDefault = true, bool isGenericName = false, bool isSingle = false)
|
|
|
+ {
|
|
|
+ if (Index > 1)
|
|
|
+ {
|
|
|
+ return $"{ParameterType.Name}{Index}";
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return $"{ParameterType.Name}";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
public override string GetDartString()
|
|
|
{
|
|
|
var dartString = new StringBuilder();
|
|
@@ -57,5 +69,14 @@ namespace FlutterCodeGenerator.ModelTypes
|
|
|
dartString.AppendLine("}");
|
|
|
return dartString.ToString();
|
|
|
}
|
|
|
+
|
|
|
+ protected override void ChangeIndex()
|
|
|
+ {
|
|
|
+ if (UserDefinedEnumDictionary != null)
|
|
|
+ {
|
|
|
+ var firstChildName = UserDefinedEnumDictionary.FirstOrDefault().Value;
|
|
|
+ DefaultValue = $"{GetFlutterTypeName()}.{firstChildName}";
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|