LocaleMatcher class
Helper, allow to find LocaleName in LocaleSwitcher.supportedLocaleNames.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- supported → SupportedLocaleNames
-
Global storage of LocaleName - instance of SupportedLocaleNames.
no setter
Static Methods
-
byLanguage(
String name) → LocaleName? - Search by first 2 letter, return first found or null.
-
byLocale(
Locale locale) → LocaleName? - Search by Locale, return exact match or null.
-
byName(
String name) → LocaleName? -
tryFindLocale(
String langCode, {IfLocaleNotFound ifLocaleNotFound = IfLocaleNotFound.doNothing}) → LocaleName? - Try to find Locale by string in LocaleSwitcher.supportedLocaleNames.
-
trySetLocale(
String langCode, {IfLocaleNotFound ifLocaleNotFound = IfLocaleNotFound.doNothing}) → void - Try to set Locale by string in LocaleSwitcher.supportedLocaleNames.