PokemonForm.fromJson constructor

PokemonForm.fromJson(
  1. Map<String, dynamic> json
)

Implementation

PokemonForm.fromJson(Map<String, dynamic> json) {
  id = json['id'];
  name = json['name'];
  order = json['order'];
  formOrder = json['form_order'];
  isDefault = json['is_default'];
  isBattleOnly = json['is_battle_only'];
  isMega = json['is_mega'];
  formName = json['form_name'];
  pokemon = json['pokemon'] != null
      ? new NamedAPIResource.fromJson(json['pokemon'])
      : null;
  sprites =
      json['sprites'] != null ? new Sprites.fromJson(json['sprites']) : null;
  versionGroup = json['version_group'] != null
      ? new NamedAPIResource.fromJson(json['version_group'])
      : null;
}