TGLocale class

Supported, default and current locale holders with locale related supporting features

Constructors

TGLocale()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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 Properties

currentLocale Locale
getter/setter pair
customPath String
getter/setter pair
defaultLocale Locale
getter/setter pair
localizations Map<String, TGLocalization>
getter/setter pair
supportedLocales Iterable<Locale>
getter/setter pair

Static Methods

findLocaleByCode(String code) Locale
Find locale from supported list based on provided code. i.e. Locale ("en", "US") = "en_US"
generateCode(Locale locale) String
Generate code for provided locale
init({required Locale defaultLocale, List<Locale>? otherLocales, String customPath = ""}) → void
Initialize Localization (i18n) implementation
loadLocales() → void
localeResolutionCallback(Locale? locale, Iterable<Locale> supportedLocales) Locale?
Callback for locale resolution
text(String key, {List<String>? args}) String
Text value of provided key with optional args which replaces each {index}