RPLocalizations class Null safety

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.
read-onlyinherited
hashCode int
The hash code for this object.
read-onlyinherited
locale Locale
finalinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
staticAssetName String
The name of the static localization asset.
read-only

Methods

canTranslate(String key) bool
Can this key be translated by this localization?
inherited
load({List<LocalizationLoader> loaders = const []}) Future<bool>
Load the translations for Research Package.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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.
read / write

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
'research_package/assets/lang'