LitLocalizations class

A controller class loading the JSON file content and enabling to get a specific localized string by it's key on the JSON file.

Constructors

LitLocalizations(Locale locale, {required String jsonAssetURL, bool debug = false})
Creates the LitLocalizations.
const

Properties

debug bool
States whether to show debug output.
final
hashCode int
The hash code for this object.
no setterinherited
jsonAssetURL String
The JSON file's location.
final
locale Locale
The device's Locale.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getLocalizedValue(String key) String
Retrieves a specific localized string by it's value from the JSON file.
loadFromAsset() Future<bool>
Loads the JSON content from storage.
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

of(BuildContext context) LitLocalizations?
Returns the LitLocalizations found in the BuildContext.