Similar to flutter locale but available without any flutter dependencies. Subclasses will be enums.
Constructors
Properties
- countryCode → String?
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- languageCode → String
-
no setter
- languageTag → String
-
Concatenates language, script and country code with dashes.
Resembles
Locale.toLanguageTagof dart:ui.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scriptCode → String?
-
no setter
- underscoreTag → String
-
For whatever reason, the intl package uses underscores instead of dashes
that contradicts https://www.unicode.org/reports/tr35/
that is used by the Locale class in dart:ui.
no setter
Methods
-
build(
{Map< String, Node> ? overrides, PluralResolver? cardinalResolver, PluralResolver? ordinalResolver}) → Future<T> - Gets a new translation instance. LocaleSettings has no effect here. Suitable for dependency injection and unit tests.
-
buildSync(
{Map< String, Node> ? overrides, PluralResolver? cardinalResolver, PluralResolver? ordinalResolver}) → T - Similar to build but synchronous. This might throw an error on Web if the library is not loaded yet (Deferred Loading).
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sameLocale(
BaseAppLocale< BaseAppLocale, BaseTranslations> other) → bool -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited