Localize class

Class to translate.

Execute the initialize() method and load the csv file.

await Localize.initialize();

After that, display the translated text by executing the get() method.

final localizeName = Localize.get("Name");

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

isInitialized bool
True if initialization has been completed.
no setter
language String
Language settings for translation.
no setter
locale String
Language locale setting.
getter/setter pair

Static Methods

get(String key, {String? defaultValue, String? language}) String
Get translated text.
initialize({String path = "assets/Localization.csv", Duration timeout = const Duration(seconds: 5), String? locale}) Future<void>
Initialize localization.