Location constructor

const Location(
  1. int id,
  2. String name,
  3. NamedAPIResource? region,
  4. List<Name> names,
  5. @JsonKey(name: 'game_indices') List<GenerationGameIndex> gameIndices,
  6. List<NamedAPIResource> areas,
)

Implementation

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

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

  /// The region this location can be found in.
  ///
  /// See also:
  ///
  /// [Region]
  NamedAPIResource? region,

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

  /// A list of game indices relevent to this location by generation.
  @JsonKey(name: 'game_indices') List<GenerationGameIndex> gameIndices,

  /// Areas that can be found within this location.
  ///
  /// See also:
  ///
  /// [LocationArea]
  List<NamedAPIResource> areas,
) = _Location;