@@ -342,7 +342,7 @@ class DioProperties extends AdditionalProperties {
342
342
343
343
DioProperties .fromMap (Map <String , dynamic > map)
344
344
: dateLibrary = EnumTransformer .dioDateLibrary (map['dateLibrary' ]),
345
- nullableFields = map['nullableFields' ] as bool ? ,
345
+ nullableFields = bool . tryParse ( map['nullableFields' ]) ,
346
346
serializationLibrary = EnumTransformer .dioSerializationLibrary (
347
347
map['serializationLibrary' ]),
348
348
super .fromMap (map);
@@ -416,9 +416,9 @@ class DioAltProperties extends AdditionalProperties {
416
416
wrapper: wrapper);
417
417
418
418
DioAltProperties .fromMap (Map <String , dynamic > map)
419
- : nullSafe = map['nullSafe' ] as bool ? ,
420
- nullSafeArrayDefault = map['nullSafeArrayDefault' ] as bool ? ,
421
- listAnyOf = map['listAnyOf' ] as bool ? ,
419
+ : nullSafe = bool . tryParse ( map['nullSafe' ]) ,
420
+ nullSafeArrayDefault = bool . tryParse ( map['nullSafeArrayDefault' ] ) ,
421
+ listAnyOf = bool . tryParse ( map['listAnyOf' ]) ,
422
422
pubspecDependencies = map['pubspecDependencies' ],
423
423
pubspecDevDependencies = map['pubspecDevDependencies' ],
424
424
super .fromMap (map);
0 commit comments