toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['id'] = this.id;
  data['name'] = this.name;
  data['order'] = this.order;
  data['form_order'] = this.formOrder;
  data['is_default'] = this.isDefault;
  data['is_battle_only'] = this.isBattleOnly;
  data['is_mega'] = this.isMega;
  data['form_name'] = this.formName;
  if (this.pokemon != null) {
    data['pokemon'] = this.pokemon!.toJson();
  }
  if (this.sprites != null) {
    data['sprites'] = this.sprites!.toJson();
  }
  if (this.versionGroup != null) {
    data['version_group'] = this.versionGroup!.toJson();
  }
  return data;
}