LocaleResolver class abstract
Built-in locale resolvers backed by query parameters, cookies, sessions, and headers.
A resolver returns one candidate locale or null when its source does not
provide a usable value. Applications can add their own source by
implementing this interface:
class AccountLocaleResolver implements LocaleResolver {
@override
String? resolve(LocaleResolutionContext context) =>
sanitizeLocale(context.sessionValue?.call('account_locale'));
}
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
LocaleResolutionContext context) → String? -
Attempts to resolve one locale from
context. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited