TranslateDelegate class
A delegate for managing Localize
instances.
This delegate is used by Flutter's localization system to load and provide
Localize
instances based on the current locale.
Example usage:
TranslateDelegate(translator: MyTranslator());
- Inheritance
-
- Object
- LocalizationsDelegate<
Localize> - TranslateDelegate
Constructors
- TranslateDelegate({required Translator translator})
-
Creates an instance of
TranslateDelegate
.
Properties
Methods
-
isSupported(
Locale locale) → bool -
Whether resources for the given locale can be loaded by this delegate.
override
-
load(
Locale locale) → Future< Localize> -
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 LocalizationsDelegate 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