L10nDelegate<T extends L10n> class

A factory for a set of localized resources of L10n, to be loaded by a Localizations widget.

Inheritance

Constructors

L10nDelegate({@required List<Locale> supported})
const

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
supported List<Locale>
The list of supported locales by this delegate. [...]
final
type Type
The type of the object returned by the load method, T by default. [...]
read-only, inherited

Methods

isSupported(Locale locale) bool
Whether resources for the given locale can be loaded by this delegate. [...]
override
load(Locale locale) Future<T>
Start loading the resources for locale. The returned future completes when the resources have finished loading. [...]
override
loadL10n(Locale locale) Future<T>
Loads a L10n class with a normalized locale and the namespaces retrieved by the dataSource. [...]
normalizeLocale(Locale locale) Locale
Normalizes locale in case it is not fully supported, but a shorter or specific one might be. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
shouldReload(covariant L10nDelegate<T> old) bool
Returns true if the resources for this delegate should be loaded again by calling the load method. [...]
override
toString() String
Returns a string representation of this object.
inherited

Operators

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