LocalisonByLanguageDelegate class

A LocalizationsDelegate that loads a JSON file from local resources directory for a supported language derived from a list of Locales.

Inheritance

Constructors

LocalisonByLanguageDelegate(Iterable<Locale> locales, {bool cachable})
Instantiates a new LocalisonByLanguageDelegate with support for the specified locales.

Properties

cachable bool
Whether to cache localizations for this delegate.
final, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
languages Iterable<String>
Supported list of (2-letter) languages.
final
locales Iterable<Locale>
Supported Locale.
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
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<Localison>
Start loading the resources for locale. The returned future completes when the resources have finished loading. [...]
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
shouldReload(covariant LocalizationsDelegate<Localison> old) bool
Returns true if the resources for this delegate should be loaded again by calling the load method. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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