Locale class

The Locale data structure represents a geographical region or location.

Annotations
  • @JsonSerializable(includeIfNull: false, explicitToJson: true, createFactory: true, createToJson: true)

Constructors

Locale({@required String country, String subdivision})
Locale.fromJson(Map<String, dynamic> json)
factory

Properties

country String
The country of the locale. Must be a valid ISO 3166 country code. For example, the code US refers to the United States of America.
@JsonKey(name: 'Country'), final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
subdivision String
The state or subdivision of the locale. A valid ISO 3166-2 subdivision code. For example, the code WA refers to the state of Washington.
@JsonKey(name: 'Subdivision'), final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited