HatangChatLocalizations class

The chat strings for the current locale. Hosts may add HatangChatLocalizations.delegate to their app; the chat screen provides itself when none is found, so this is optional.

Constructors

HatangChatLocalizations({required HatangLocale locale, required HatangChatStrings strings})
Creates localizations.
const
HatangChatLocalizations.forLocale(HatangLocale locale, {Map<HatangLocale, HatangChatStrings>? overrides})
Strings for locale with optional overrides per locale.
factory

Properties

flutterLocale → Locale
The Flutter Locale for locale.
no setter
hashCode → int
The hash code for this object.
no setterinherited
locale → HatangLocale
The locale.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
strings → HatangChatStrings
The strings.
final

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

fromFlutterLocale(Locale? l) → HatangLocale
Maps a Flutter Locale to a chat locale.
maybeOf(BuildContext context) → HatangChatLocalizations?
Finds the nearest localizations, or null.
of(BuildContext context) → HatangChatLocalizations
The strings of the enclosing chat screen or view, else the nearest localizations, falling back to the ambient Locale (English if it starts with en, Vietnamese otherwise).

Constants

delegate → const LocalizationsDelegate<HatangChatLocalizations>
Localizations delegate (Vietnamese and English).