AppLocalizations class

Main localization class that loads and provides translations

Constructors

AppLocalizations(Locale locale)

Properties

hashCode int
The hash code for this object.
no setterinherited
keys List<String>
Get all available keys
no setter
locale Locale
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

load() Future<bool>
Load the JSON file for the current locale
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
tr(String key) String
Short alias for translate
translate(String key) String
Translate a key to the current locale

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

of(BuildContext context) AppLocalizations
Get the current AppLocalizations instance from context

Constants

delegate → const LocalizationsDelegate<AppLocalizations>
Localization delegate