|
|
@ -174,6 +174,7 @@ String findFromJsonHandling( |
|
|
|
String functionPrefix = 'f.', |
|
|
|
String functionPrefix = 'f.', |
|
|
|
String? varNameInsteadOfKeyName} |
|
|
|
String? varNameInsteadOfKeyName} |
|
|
|
) { |
|
|
|
) { |
|
|
|
|
|
|
|
final varAccess = varNameInsteadOfKeyName ?? "json['$keyName']"; |
|
|
|
if (type.startsWith('vector<')) { |
|
|
|
if (type.startsWith('vector<')) { |
|
|
|
final tmp1 = type.replaceFirst('vector<', ''); |
|
|
|
final tmp1 = type.replaceFirst('vector<', ''); |
|
|
|
final tmp2 = tmp1.substring(0, tmp1.length - 1); |
|
|
|
final tmp2 = tmp1.substring(0, tmp1.length - 1); |
|
|
@ -187,10 +188,9 @@ String findFromJsonHandling( |
|
|
|
objectPrefix: objectPrefix, |
|
|
|
objectPrefix: objectPrefix, |
|
|
|
varNameInsteadOfKeyName: 'e', |
|
|
|
varNameInsteadOfKeyName: 'e', |
|
|
|
); |
|
|
|
); |
|
|
|
return "(json['$keyName'] as List<dynamic>).map((e) => ($innerHandler)).toList(growable: false)"; |
|
|
|
return '($varAccess as List<dynamic>).map((e) => ($innerHandler)).toList(growable: false)'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
final varAccess = varNameInsteadOfKeyName ?? "json['$keyName']"; |
|
|
|
|
|
|
|
final predefined = { |
|
|
|
final predefined = { |
|
|
|
'double': 'double', |
|
|
|
'double': 'double', |
|
|
|
'string': 'String', |
|
|
|
'string': 'String', |
|
|
|