toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data =  Map<String, dynamic>();
  data['id'] = this.id;
  data['name'] = this.name;
  if (this.decreasedStat != null) {
    data['decreased_stat'] = this.decreasedStat!.toJson();
  }
  if (this.increasedStat != null) {
    data['increased_stat'] = this.increasedStat!.toJson();
  }
  if (this.likesFlavor != null) {
    data['likes_flavor'] = this.likesFlavor!.toJson();
  }
  if (this.hatesFlavor != null) {
    data['hates_flavor'] = this.hatesFlavor!.toJson();
  }
  if (this.pokeathlonStatChanges != null) {
    data['pokeathlon_stat_changes'] =
        this.pokeathlonStatChanges!.map((v) => v.toJson()).toList();
  }
  if (this.moveBattleStylePreferences != null) {
    data['move_battle_style_preferences'] =
        this.moveBattleStylePreferences!.map((v) => v.toJson()).toList();
  }
  if (this.names != null) {
    data['names'] = this.names!.map((v) => v.toJson()).toList();
  }
  return data;
}