IntlLocale class
Represents a locale, with language and region codes.
- Implemented types
Constructors
- IntlLocale(dynamic locale)
-
Dynamic parsing and instantiation.
factory
- IntlLocale.code(String localeCode)
- Instantiate using a string locale code.
- IntlLocale.langReg(String language, [String? region])
- IntlLocale.path(String path)
-
Instantiate parsing a path and finding the locale code in it.
factory
Properties
- code → String
-
Full locale code, example: 'en_US', 'pt_BR'
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- hasRegion → bool
-
no setter
- language → String
-
no setter
- region → String
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
compareTo(
IntlLocale o) → int -
Compares this object to another object.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Properties
- defaultLocale → String?
-
no setter
-
onDefineDefaultLocale
→ EventStream<
String> -
no setter
Static Methods
-
from(
dynamic locale) → IntlLocale? -
getDefaultIntlLocale(
) → IntlLocale -
getDefaultLocale(
) → String? -
setDefaultLocale(
dynamic locale) → void