toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = Map<String, dynamic>();
data['id'] = this.id;
data['name'] = this.name;
if (this.damageRelations != null) {
data['damage_relations'] = this.damageRelations!.toJson();
}
if (this.gameIndices != null) {
data['game_indices'] = this.gameIndices!.map((v) => v.toJson()).toList();
}
if (this.generation != null) {
data['generation'] = this.generation!.toJson();
}
if (this.moveDamageClass != null) {
data['move_damage_class'] = this.moveDamageClass!.toJson();
}
if (this.names != null) {
data['names'] = this.names!.map((v) => v.toJson()).toList();
}
if (this.pokemon != null) {
data['pokemon'] = this.pokemon!.map((v) => v.toJson()).toList();
}
if (this.moves != null) {
data['moves'] = this.moves!.map((v) => v.toJson()).toList();
}
return data;
}