LocaleSettings class
Manages all translation instances and the current locale
- Inheritance
-
- Object
- BaseLocaleSettings<
AppLocale, StringsEn> - BaseFlutterLocaleSettings<
AppLocale, StringsEn> - LocaleSettings
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- listenToDeviceLocale ↔ bool
-
If true, then TranslationProvider will trigger setLocale on
device locale change (e.g. due to user interaction in device settings).
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
translationMap
→ Map<
AppLocale, StringsEn> -
Internal: Manages all translation instances
May be modified when setting a custom plural resolver
finalinherited
-
utils
→ BaseAppLocaleUtils<
AppLocale, StringsEn> -
Internal: Reference to utils instance
finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateProviderState(
BaseAppLocale< BaseAppLocale, BaseTranslations> locale) → void -
Updates the provider state and therefore triggers a rebuild
on all widgets listening to this provider.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- currentLocale → AppLocale
-
no setter
- instance → LocaleSettings
-
final
-
supportedLocales
→ List<
Locale> -
no setter
-
supportedLocalesRaw
→ List<
String> -
no setter
Static Methods
-
getLocaleStream(
) → Stream< AppLocale> -
setLocale(
AppLocale locale) → AppLocale -
setLocaleRaw(
String rawLocale) → AppLocale -
setPluralResolver(
{String? language, AppLocale? locale, PluralResolver? cardinalResolver, PluralResolver? ordinalResolver}) → void -
useDeviceLocale(
) → AppLocale