RPLocalizations class

Localization support for Research Package using LocalizationLoader configurations.

Use translate to translate any text, like this:

 RPLocalizations.of(context).translate('key');
Inheritance

Constructors

RPLocalizations(Locale locale)
Create a localization based on locale.

Properties

filename String
The file name of the localization asset.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
locale Locale
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
staticAssetName String
The name of the static localization asset.
no setter
translations Map<String, String>
A map of available translations for this locale.
getter/setter pairinherited

Methods

canTranslate(String key) bool
Can this key be translated by this localization?
inherited
load({List<LocalizationLoader> loaders = const []}) Future<void>
Load the translations for Research Package.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
translate(String key) String
Translate key to this locale. If key is not translated, key is returned 'as-is'.
inherited

Operators

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

Static Properties

delegate LocalizationsDelegate<RPLocalizations>
A default LocalizationsDelegate for RPLocalizations.
getter/setter pair

Static Methods

of(BuildContext context) RPLocalizations?
Returns the localized resources object of type RPLocalizations for the widget tree that corresponds to the given context.
override

Constants

assetPath → const String