LocalizeAndTranslate class

LocalizeAndTranslate is the main class of the package. It is used to initialize the package and to translate the words. It is a singleton class. It is used as follows:

Constructors

LocalizeAndTranslate.new()
LocalizeAndTranslate constructor
factory

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

delegates Iterable<LocalizationsDelegate>
no setter
notifyUI ↔ void Function()?
notifyUI is the function that is used to notify the UI.
getter/setter pair

Static Methods

directionBuilder(BuildContext context, Widget? child) Widget
getCountryCode() String?
getKeys() List<String>
getLanguageCode() String
getLocale() Locale
getLocals() List<Locale>
init({required AssetLoaderBase assetLoader, List<AssetLoaderBase>? assetLoadersExtra, List<Locale>? supportedLocales, List<String>? supportedLanguageCodes, LocalizationDefaultType defaultType = LocalizationDefaultType.device, String? hivePath, HiveStorageBackendPreference? hiveBackendPreference, JsonMapperBase? mapper}) Future<void>
isRTL() bool
isRtlLanguage(String languageCode) bool
Determines if a language is written right-to-left based on its language code.
setHivePath(String path) Future<void>
setLanguageCode(String languageCode) Future<void>
setLocale(Locale locale) Future<void>
translate(String key, {String? defaultValue}) String