Ability constructor

const Ability(
  1. int id,
  2. String name,
  3. @JsonKey(name: 'is_main_series') bool isMainSeries,
  4. NamedAPIResource generation,
  5. List<Name> names,
  6. @JsonKey(name: 'effect_entries') List<VerboseEffect> effectEntries,
  7. @JsonKey(name: 'effect_changes') List<AbilityEffectChange> effectChanges,
  8. @JsonKey(name: 'flavor_text_entries') List<AbilityFlavorText> flavorTextEntries,
  9. 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;