Ability constructor
const
Ability(
- int id,
- String name,
- @JsonKey(name: 'is_main_series') bool isMainSeries,
- NamedAPIResource generation,
- List<
Name> names, - @JsonKey(name: 'effect_entries') List<
VerboseEffect> effectEntries, - @JsonKey(name: 'effect_changes') List<
AbilityEffectChange> effectChanges, - @JsonKey(name: 'flavor_text_entries') List<
AbilityFlavorText> flavorTextEntries, - List<
AbilityPokemon> pokemon,
Implementation
const factory Ability(
/// The identifier for this resource.
int id,
/// The name for this resource.
String name,
/// Whether or not this ability originated in the main series of the video games.
@JsonKey(name: 'is_main_series') bool isMainSeries,
/// The generation this ability originated in.
///
/// See also:
///
/// [Generation]
NamedAPIResource generation,
/// The name of this resource listed in different languages.
List<Name> names,
/// The effect of this ability listed in different languages.
@JsonKey(name: 'effect_entries') List<VerboseEffect> effectEntries,
/// The list of previous effects this ability has had across version groups.
@JsonKey(name: 'effect_changes') List<AbilityEffectChange> effectChanges,
/// The flavor text of this ability listed in different languages.
@JsonKey(name: 'flavor_text_entries')
List<AbilityFlavorText> flavorTextEntries,
/// A list of Pokémon that could potentially have this ability.
List<AbilityPokemon> pokemon,
) = _Ability;