mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 22:09:06 +00:00
Add analysis_options, format and fix up (#104)
This commit is contained in:
@@ -29,24 +29,27 @@ class ConvertedComplexObject {
|
||||
if (json == null) return null;
|
||||
|
||||
return ConvertedComplexObject(
|
||||
aString: json['aString'],
|
||||
anInt: json['anInt'],
|
||||
aDouble: json['aDouble'],
|
||||
aString: json['aString'] as String,
|
||||
anInt: json['anInt'] as int,
|
||||
aDouble: json['aDouble'] as double,
|
||||
anObject: json['anObject'] != null
|
||||
? ConvertedSimpleObject.fromJson(json['anObject'])
|
||||
? ConvertedSimpleObject.fromJson(
|
||||
json['anObject'] as Map<String, dynamic>)
|
||||
: null,
|
||||
aListOfStrings: json['aListOfStrings'] != null
|
||||
? List<String>.from(json['aListOfStrings'])
|
||||
? List<String>.from(json['aListOfStrings'] as Iterable<dynamic>)
|
||||
: null,
|
||||
aListOfInts: json['aListOfInts'] != null
|
||||
? List<int>.from(json['aListOfInts'])
|
||||
? List<int>.from(json['aListOfInts'] as Iterable<dynamic>)
|
||||
: null,
|
||||
aListOfDoubles: json['aListOfDoubles'] != null
|
||||
? List<double>.from(json['aListOfDoubles'])
|
||||
? List<double>.from(json['aListOfDoubles'] as Iterable<dynamic>)
|
||||
: null,
|
||||
aListOfObjects: json['aListOfObjects'] != null
|
||||
? List<ConvertedSimpleObject>.from(json['aListOfObjects']
|
||||
.map((o) => ConvertedSimpleObject.fromJson(o)))
|
||||
? List<ConvertedSimpleObject>.from((json['aListOfObjects']
|
||||
as Iterable<dynamic>)
|
||||
.map<dynamic>((dynamic o) =>
|
||||
ConvertedSimpleObject.fromJson(o as Map<String, dynamic>)))
|
||||
: null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user