Pokemon class

Annotations
  • @freezed

Constructors

Pokemon(int id, String name, @JsonKey(name: 'base_experience') int? baseExperience, int height, @JsonKey(name: 'is_default') bool isDefault, int order, int weight, List<PokemonAbility> abilities, List<NamedAPIResource> forms, @JsonKey(name: 'game_indices') List<VersionGameIndex> gameIndices, @JsonKey(name: 'held_items') List<PokemonHeldItem> heldItems, @JsonKey(name: 'location_area_encounters') String locationAreaEncounters, List<PokemonMove> moves, @JsonKey(name: 'past_types') List<PokemonTypePast> pastTypes, PokemonSprites sprites, NamedAPIResource species, List<PokemonStat> stats, List<PokemonType> types)
const
factory
Pokemon.fromJson(Json json)
factory

Properties

abilities List<PokemonAbility>
A list of abilities this Pokémon could potentially have.
no setterinherited
baseExperience int?
The base experience gained for defeating this Pokémon.
no setterinherited
copyWith → $PokemonCopyWith<Pokemon>
no setterinherited
forms List<NamedAPIResource>
A list of forms this Pokémon can take on.
no setterinherited
gameIndices List<VersionGameIndex>
A list of game indices relevent to Pokémon item by generation.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
height int
The height of this Pokémon in decimetres.
no setterinherited
heldItems List<PokemonHeldItem>
A list of items this Pokémon may be holding when encountered.
no setterinherited
id int
The identifier for this resource.
no setterinherited
isDefault bool
Set for exactly one Pokémon used as the default for each species.
no setterinherited
locationAreaEncounters String
A link to a list of location areas, as well as encounter details pertaining to specific versions.
no setterinherited
moves List<PokemonMove>
A list of moves along with learn methods and level details pertaining to specific version groups.
no setterinherited
name String
The name for this resource.
no setterinherited
order int
Order for sorting. Almost national order, except families are grouped together.
no setterinherited
pastTypes List<PokemonTypePast>
A list of details showing types this pokémon had in previous generations
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
species NamedAPIResource
The species this Pokémon belongs to.
no setterinherited
sprites PokemonSprites
A set of sprites used to depict this Pokémon in the game. A visual representation of the various sprites can be found at PokeAPI/sprites
no setterinherited
stats List<PokemonStat>
A list of base stat values for this Pokémon.
no setterinherited
types List<PokemonType>
A list of details showing types this Pokémon has.
no setterinherited
weight int
The weight of this Pokémon in hectograms.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited