LocaleStorage class abstract
Contract for persisting user locale selection across browser sessions.
Pure-Dart interface. In browser environments, adapters can implement this using
window.localStorage without introducing browser dependencies into core logic.
In SSR or test environments, InMemoryLocaleStorage provides an in-memory fallback.
See also:
- InMemoryLocaleStorage, the default memory-based adapter.
- BloomI18n, which delegates locale persistence to LocaleStorage.
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
-
load(
) → Future< String?> -
Loads the persisted locale identifier, or
nullif none saved. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
save(
String locale) → Future< void> -
Persists
localefor future application sessions. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited