LocaleSettings class
Manages all translation instances and the current locale
- Inheritance
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- lazy → bool
-
If true, then only the base locale is loaded initially.
Secondary locales are loaded on demand:
finalinherited
- 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<
EmojiMartLocale, EmojiMartTranslations> -
Internal: Manages all translation instances.
The base locale is always included.
Additional locales are added when calling loadLocale.
May be modified when setting a custom plural resolver.
finalinherited
-
translationsLoading
→ Set<
EmojiMartLocale> -
Internal:
Keeps track of loading translations to prevent multiple requests.
This lock is sufficient because Dart's async loop is single-threaded.
finalinherited
-
utils
→ BaseAppLocaleUtils<
EmojiMartLocale, EmojiMartTranslations> -
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 → EmojiMartLocale
-
no setter
- instance → LocaleSettings
-
final
Static Methods
-
getLocaleStream(
) → Stream< EmojiMartLocale> -
setLocale(
EmojiMartLocale locale, {bool? listenToDeviceLocale = false}) → Future< EmojiMartLocale> -
setLocaleRaw(
String rawLocale, {bool? listenToDeviceLocale = false}) → Future< EmojiMartLocale> -
setLocaleRawSync(
String rawLocale, {bool? listenToDeviceLocale = false}) → EmojiMartLocale -
setLocaleSync(
EmojiMartLocale locale, {bool? listenToDeviceLocale = false}) → EmojiMartLocale -
setPluralResolver(
{String? language, EmojiMartLocale? locale, PluralResolver? cardinalResolver, PluralResolver? ordinalResolver}) → Future< void> -
setPluralResolverSync(
{String? language, EmojiMartLocale? locale, PluralResolver? cardinalResolver, PluralResolver? ordinalResolver}) → void -
useDeviceLocale(
) → Future< EmojiMartLocale> -
useDeviceLocaleSync(
) → EmojiMartLocale