AppLocale enum
Supported locales, see extension methods below.
Usage:
- LocaleSettings.setLocale(AppLocale.en) // set locale
- Locale locale = AppLocale.en.flutterLocale // get flutter locale from enum
- if (LocaleSettings.currentLocale == AppLocale.en) // locale check
- Inheritance
- Available extensions
Values
Properties
- flutterLocale → Locale
-
Available on AppLocale, provided by the AppLocaleExtensions extension
no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- languageTag → String
-
Available on AppLocale, provided by the AppLocaleExtensions extension
no setter - name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- translations → _StringsEn
-
Available on AppLocale, provided by the AppLocaleExtensions extension
Gets the translation instance managed by this library. TranslationProvider is using this instance. The plural resolvers are set via LocaleSettings.no setter
Methods
-
build(
) → _StringsEn -
Available on AppLocale, provided by the AppLocaleExtensions extension
Gets a new translation instance. LocaleSettings has no effect here. Suitable for dependency injection and unit tests. -
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