Localization class

Inheritance
  • Object
  • Translations
  • Localization

Constructors

Localization({Map<String, Map<String, String>>? messageTranslations, List<CurrencyConfig>? currencies, List<String> languages = const ['en'], String currency = 'USD', String language = 'en', List<LocaleConfig> locales = const [], String? timezone})

Properties

currencies ↔ List<CurrencyConfig>
list of supported currencies, provided via configs
getter/setter pair
currency ↔ String
current selected currency, ISO 4217 code
getter/setter pair
currentCurrencyConfig → CurrencyConfig
no setter
currentLocaleConfig → LocaleConfig
no setter
flags ↔ Map<String, String>
map of ISO 639-1 code to flag emoji, provided via configs
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
keys → Map<String, Map<String, String>>
no setteroverride
language ↔ String
getter/setter pair
languages ↔ List<String>
ISO 639-1 codes
getter/setter pair
locales ↔ List<LocaleConfig>
list of supported locales, provided via configs
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timezone ↔ String?
getter/setter pair
timezoneLocation → Location?
no setter

Methods

changeLocale(String langCode, String? countryCode) → Future<void>
getTimezoneDateTime(DateTime dateTime) → DateTime
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

translations → Map<String, Map<String, String>>
final

Constants

fallbackLocale → const Locale