SupportedLocalesUtils class
A utility class that provides helper methods for supported locales.
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 Methods
-
getLocale(
String? locale) → DateFormatterLocale - Returns a DateFormatterLocale instance for the given locale code.
-
getRelativeLocale(
String? locale) → DateFormatterLocale - Returns a DateFormatterLocale instance for the given locale code, including those that only support relative date formatting.
-
getSupportedLocales(
) → List< String> - Returns a list of supported locales.
-
getSupportedRelativeLocales(
) → List< String> - Returns a list of supported relative locales.
-
isLocaleSupported(
String locale) → bool -
Returns
trueif the given locale, or its language, is supported. -
registerLocale(
String locale, DateFormatterLocale localeInstance) → void - Override and add a new locale to the supported locales.