ClimateSupplier.fromJson constructor
ClimateSupplier.fromJson(
- Object? json
Implementation
factory ClimateSupplier.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return ClimateSupplier(
id: (map['id'] as String),
infoUrl: (map['info_url'] as String),
livemode: (map['livemode'] as bool),
locations: (map['locations'] as List<Object?>)
.map((el) => ClimateRemovalsLocation.fromJson(el))
.toList(),
name: (map['name'] as String),
removalPathway:
ClimateSupplierRemovalPathway.fromJson(map['removal_pathway']),
);
}