Item constructor
const
Item(
- int id,
- String name,
- int cost,
- @JsonKey(name: 'fling_power') int? flingPower,
- @JsonKey(name: 'fling_effect') NamedAPIResource? flingEffect,
- List<
NamedAPIResource> attributes, - NamedAPIResource category,
- @JsonKey(name: 'effect_entries') List<
VerboseEffect> effectEntries, - @JsonKey(name: 'flavor_text_entries') List<
VersionGroupFlavorText> flavorTextEntries, - @JsonKey(name: 'game_indices') List<
GenerationGameIndex> gameIndices, - List<
Name> names, - ItemSprites sprites,
- @JsonKey(name: 'held_by_pokemon') List<
ItemHolderPokemon> heldByPokemon, - @JsonKey(name: 'baby_trigger_for') APIResource? babyTriggerFor,
- List<
MachineVersionDetail> machines,
Implementation
const factory Item(
/// The identifier for this resource.
int id,
/// The name for this resource.
String name,
/// The price of this item in stores.
int cost,
/// The power of the move Fling when used with this item.
@JsonKey(name: 'fling_power') int? flingPower,
/// The effect of the move Fling when used with this item.
///
/// See also:
///
/// [ItemFlingEffect]
@JsonKey(name: 'fling_effect') NamedAPIResource? flingEffect,
/// A list of attributes this item has.
///
/// See also:
///
/// [ItemAttribute]
List<NamedAPIResource> attributes,
/// The category of items this item falls into.
///
/// See also:
///
/// [ItemCategory]
NamedAPIResource category,
/// The effect of this ability listed in different languages.
@JsonKey(name: 'effect_entries') List<VerboseEffect> effectEntries,
/// The flavor text of this ability listed in different languages.
@JsonKey(name: 'flavor_text_entries')
List<VersionGroupFlavorText> flavorTextEntries,
/// A list of game indices relevent to this item by generation.
@JsonKey(name: 'game_indices') List<GenerationGameIndex> gameIndices,
/// The name of this item listed in different languages.
List<Name> names,
/// A set of sprites used to depict this item in the game.
ItemSprites sprites,
/// A list of Pokémon that might be found in the wild holding this item
@JsonKey(name: 'held_by_pokemon') List<ItemHolderPokemon> heldByPokemon,
/// An evolution chain this item requires to produce a bay during mating.
///
/// See also:
///
/// [EvolutionChain]
@JsonKey(name: 'baby_trigger_for') APIResource? babyTriggerFor,
/// A list of the machines related to this item.
List<MachineVersionDetail> machines,
) = _Item;