CachedPrefsAdapter class final
A KeyValueStoreInterface
implementation backed by
SharedPreferencesWithCache
.
Provides a synchronous-like caching layer using
SharedPreferencesWithCache
to minimize disk I/O.
The adapter initializes lazily on first access.
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
-
delete(
String key) → Future< void> -
Deletes the entry for the given
key
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
String key) → Future< String?> -
Reads the value associated with the given
key
. -
readAll(
) → Future< Map< String, String> > - Reads and returns all key-value pairs from storage.
-
toString(
) → String -
A string representation of this object.
inherited
-
write(
String key, String value) → Future< void> -
Writes the provided
value
for the givenkey
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited