mirror of https://github.com/flutter/samples.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.6 KiB
46 lines
1.6 KiB
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'serializable_complex_object.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
SerializableComplexObject _$SerializableComplexObjectFromJson(
|
|
Map<String, dynamic> json) {
|
|
return SerializableComplexObject(
|
|
aString: json['aString'] as String?,
|
|
anInt: json['anInt'] as int?,
|
|
aDouble: (json['aDouble'] as num?)?.toDouble(),
|
|
anObject: json['anObject'] == null
|
|
? null
|
|
: SerializableSimpleObject.fromJson(
|
|
json['anObject'] as Map<String, dynamic>),
|
|
aListOfStrings: (json['aListOfStrings'] as List<dynamic>?)
|
|
?.map((e) => e as String)
|
|
.toList(),
|
|
aListOfInts:
|
|
(json['aListOfInts'] as List<dynamic>?)?.map((e) => e as int).toList(),
|
|
aListOfDoubles: (json['aListOfDoubles'] as List<dynamic>?)
|
|
?.map((e) => (e as num).toDouble())
|
|
.toList(),
|
|
aListOfObjects: (json['aListOfObjects'] as List<dynamic>?)
|
|
?.map(
|
|
(e) => SerializableSimpleObject.fromJson(e as Map<String, dynamic>))
|
|
.toList(),
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> _$SerializableComplexObjectToJson(
|
|
SerializableComplexObject instance) =>
|
|
<String, dynamic>{
|
|
'aString': instance.aString,
|
|
'anInt': instance.anInt,
|
|
'aDouble': instance.aDouble,
|
|
'anObject': instance.anObject,
|
|
'aListOfStrings': instance.aListOfStrings,
|
|
'aListOfInts': instance.aListOfInts,
|
|
'aListOfDoubles': instance.aListOfDoubles,
|
|
'aListOfObjects': instance.aListOfObjects,
|
|
};
|