ModelLocale class
Define a model Locale that stores the locale.
The base value is given as value. If not given, it is set as en_US
.
ロケールを保存するLocaleをモデルとして定義します。
ベースの値をvalueとして与えます。与えられなかった場合en_US
としてセットされます。
- Inheritance
-
- Object
- ModelFieldValue<
Locale> - ModelLocale
- Implemented types
- Annotations
Constructors
- ModelLocale([Locale? value])
-
Define a model Locale that stores the locale.
constfactory
- ModelLocale.fromCode(String language, [String? country])
-
Define a model Locale that stores the locale.
constfactory
- ModelLocale.fromJson(DynamicMap json)
-
Convert from
json
map to ModelLocale.factory - ModelLocale.fromServer([Locale? value])
-
Used to disguise the retrieval of data from the server.
constfactory
Properties
Methods
-
compareTo(
ModelLocale other) → int -
Compares this object to another object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → DynamicMap -
Methods for Json serialization.
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Constants
- kCountryKey → const String
- Key to save country code.
- kLaunguageKey → const String
- Key to save the language code.
- kSourceKey → const String
- Key to store the data source.
- typeString → const String
- Type key.