EzLocalizationDelegate class
The EzLocalization delegate class.
- Inheritance
-
- Object
- LocalizationsDelegate<
EzLocalization> - EzLocalizationDelegate
Constructors
-
EzLocalizationDelegate({List<
Locale> supportedLocales = const [Locale('en')], GetPathFunction getPathFunction = EzLocalization.defaultGetPathFunction, String notFoundString = EzLocalization.defaultNotFoundString, Locale? locale}) -
Creates a new app localization delegate instance.
const
Properties
- getPathFunction → GetPathFunction
-
The get path function.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- locale → Locale?
-
The locale to force (if specified, not recommended except under special circumstances).
final
-
localizationDelegates
→ List<
LocalizationsDelegate> -
The localization delegates to add in your application.
no setter
- notFoundString → String
-
The string to return if the key is not found.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
supportedLocales
→ List<
Locale> -
Contains all supported locales.
final
- 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< EzLocalization> -
Start loading the resources for
locale
. The returned future completes when the resources have finished loading.override -
localeResolutionCallback(
Locale? locale, Iterable< Locale> supportedLocales) → Locale - The default locale resolution callback.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
shouldReload(
covariant EzLocalizationDelegate 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