toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = Map<String, dynamic>();
data['id'] = this.id;
data['name'] = this.name;
data['is_main_series'] = this.isMainSeries;
if (this.generation != null) {
data['generation'] = this.generation!.toJson();
}
if (this.names != null) {
data['names'] = this.names!.map((v) => v.toJson()).toList();
}
if (this.effectEntries != null) {
data['effect_entries'] =
this.effectEntries!.map((v) => v.toJson()).toList();
}
if (this.effectChanges != null) {
data['effect_changes'] =
this.effectChanges!.map((v) => v.toJson()).toList();
}
if (this.flavorTextEntries != null) {
data['flavor_text_entries'] =
this.flavorTextEntries!.map((v) => v.toJson()).toList();
}
if (this.pokemon != null) {
data['pokemon'] = this.pokemon!.map((v) => v.toJson()).toList();
}
return data;
}