mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 22:09:06 +00:00
Landing beta changes in master for the new stable release (#747)
This commit is contained in:
@@ -16,22 +16,20 @@ class ConvertedComplexObject {
|
||||
this.aListOfObjects,
|
||||
});
|
||||
|
||||
final String aString;
|
||||
final int anInt;
|
||||
final double aDouble;
|
||||
final ConvertedSimpleObject anObject;
|
||||
final List<String> aListOfStrings;
|
||||
final List<int> aListOfInts;
|
||||
final List<double> aListOfDoubles;
|
||||
final List<ConvertedSimpleObject> aListOfObjects;
|
||||
final String? aString;
|
||||
final int? anInt;
|
||||
final double? aDouble;
|
||||
final ConvertedSimpleObject? anObject;
|
||||
final List<String>? aListOfStrings;
|
||||
final List<int>? aListOfInts;
|
||||
final List<double>? aListOfDoubles;
|
||||
final List<ConvertedSimpleObject>? aListOfObjects;
|
||||
|
||||
factory ConvertedComplexObject.fromJson(Map<String, dynamic> json) {
|
||||
if (json == null) return null;
|
||||
|
||||
return ConvertedComplexObject(
|
||||
aString: json['aString'] as String,
|
||||
anInt: json['anInt'] as int,
|
||||
aDouble: json['aDouble'] as double,
|
||||
aString: json['aString'] as String?,
|
||||
anInt: json['anInt'] as int?,
|
||||
aDouble: json['aDouble'] as double?,
|
||||
anObject: json['anObject'] != null
|
||||
? ConvertedSimpleObject.fromJson(
|
||||
json['anObject'] as Map<String, dynamic>)
|
||||
|
||||
Reference in New Issue
Block a user