An abstract interface for a type-safe key-value storage system.
This interface is designed to work with KeyPreferences, providing safe read/write access to primitive and complex types using typed keys.
It also supports versioned initialization and test mocking.
Also provides KeyValuePreferencesMigrator for handling version migrations.
- Implementers
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
-
clear(
List< KeyPreferences< typedStoreKeys, {List<Object> >KeyPreferences< ? excludeKeys}) → Future<Object> >void> -
Clears values from the store by the specified
typedStoreKeys. -
contains(
KeyPreferences< Object> keyPreferences) → Future<bool> -
Checks whether the given
keyPreferencesexists in the store. -
getRawKeys(
) → Set< String> - Returns all raw string keys currently stored.
-
initialization(
{bool invalidate = false, int version = 1, KeyValuePreferencesMigrator? migrator}) → Future< void> - Initializes the underlying store.
-
mockInitiazation(
Map< String, Object> mockInitialValue, {int version = 1, KeyValuePreferencesMigrator? migrator}) → Future<void> - Initializes the store with mock data for testing purposes.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read<
T> (KeyPreferences< T> typedStoreKey) → T? -
Reads the value associated with the given
typedStoreKey. -
toString(
) → String -
A string representation of this object.
inherited
-
write<
T> (KeyPreferences< T> typedStoreKey, T? value) → Future<void> -
Writes a value to the store using the given
typedStoreKey.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited