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.pokemonSpeciesDetails != null) {
data['pokemon_species_details'] =
this.pokemonSpeciesDetails!.map((v) => v.toJson()).toList();
}
if (this.requiredForEvolution != null) {
data['required_for_evolution'] =
this.requiredForEvolution!.map((v) => v.toJson()).toList();
}
return data;
}