JsonIntlDelegate class
A factory for a set of localized JsonIntl resources to be loaded by a Localizations widget.
- Inheritance
-
- Object
- LocalizationsDelegate<
JsonIntl> - JsonIntlDelegate
- Annotations
Constructors
-
JsonIntlDelegate({List<
String> ? availableLocales, String base = 'assets/intl', bool debug = false}) -
Create the factory responsible of loading the language files
const
Properties
-
availableLocales
→ List<
String> ? -
List of locales that can be used by the application. If null, the locales
will be detedected automatically.
final
- base → String
-
The assets path where to find the localization files
final
- debug → bool
-
Wether to use debug locatizations or not.
In debug mode, the string returned will contain debug information
about how it is translated
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → Type
-
The type of the object returned by the load method, T by default.
no setterinherited
Methods
-
isSupported(
Locale locale) → bool -
Whether resources for the given locale can be loaded by this delegate.
override
-
load(
Locale locale) → Future< JsonIntl> -
Start loading the resources for
locale
. The returned future completes when the resources have finished loading.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
shouldReload(
covariant JsonIntlDelegate old) → bool -
Returns true if the resources for this delegate should be loaded
again by calling the load method.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited