Berry.fromJson constructor
Implementation
Berry.fromJson(Map<String, dynamic> json) {
firmness = json['firmness'] != null
? NamedAPIResource.fromJson(json['firmness'])
: null;
if (json['flavors'] != null) {
flavors = <Flavors>[];
json['flavors'].forEach((v) {
flavors!.add( Flavors.fromJson(v));
});
}
growthTime = json['growth_time'];
id = json['id'];
item = json['item'] != null
? NamedAPIResource.fromJson(json['item'])
: null;
maxHarvest = json['max_harvest'];
name = json['name'];
naturalGiftPower = json['natural_gift_power'];
naturalGiftType = json['natural_gift_type'] != null
? NamedAPIResource.fromJson(json['natural_gift_type'])
: null;
size = json['size'];
smoothness = json['smoothness'];
soilDryness = json['soil_dryness'];
}