Nature constructor

const Nature(
  1. int id,
  2. String name,
  3. @JsonKey(name: 'decreased_stat') NamedAPIResource? decreasedStat,
  4. @JsonKey(name: 'increased_stat') NamedAPIResource? increasedStat,
  5. @JsonKey(name: 'hates_flavor') NamedAPIResource? hatesFlavor,
  6. @JsonKey(name: 'likes_flavor') NamedAPIResource? likesFlavor,
  7. @JsonKey(name: 'pokeathlon_stat_changes') List<NatureStatChange> pokeathlonStatChanges,
  8. @JsonKey(name: 'move_battle_style_preferences') List<MoveBattleStylePreference> moveBattleStylePreferences,
  9. List<Name> names,
)

Implementation

const factory Nature(
  /// The identifier for this resource.
  int id,

  /// The name for this resource.
  String name,

  /// The stat decreased by 10% in Pokémon with this nature.
  ///
  /// See also:
  ///
  /// [Stat]
  @JsonKey(name: 'decreased_stat') NamedAPIResource? decreasedStat,

  /// The stat increased by 10% in Pokémon with this nature.
  ///
  /// See also:
  ///
  /// [Stat]
  @JsonKey(name: 'increased_stat') NamedAPIResource? increasedStat,

  /// The flavor hated by Pokémon with this nature.
  ///
  /// See also:
  ///
  /// [BerryFlavor]
  @JsonKey(name: 'hates_flavor') NamedAPIResource? hatesFlavor,

  /// The flavor liked by Pokémon with this nature.
  ///
  /// See also:
  ///
  /// [BerryFlavor]
  @JsonKey(name: 'likes_flavor') NamedAPIResource? likesFlavor,

  /// A list of Pokéathlon stats this nature effects and how much it effects them.
  @JsonKey(name: 'pokeathlon_stat_changes')
      List<NatureStatChange> pokeathlonStatChanges,

  /// A list of battle styles and how likely a Pokémon with this nature is
  /// to use them in the Battle Palace or Battle Tent.
  @JsonKey(name: 'move_battle_style_preferences')
      List<MoveBattleStylePreference> moveBattleStylePreferences,

  /// The name of this resource listed in different languages.
  List<Name> names,
) = _Nature;