BlocStorage class abstract
Abstract interface for BlocFx state persistence storage.
Implement this interface to create custom storage backends like Hive, Isar, SQLite, or any other storage solution.
- Implementers
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
-
clear(
) → Future< void> - Clear all stored data.
-
delete(
String key) → Future< void> - Delete data associated with the given key.
-
init(
) → Future< void> - Initialize the storage backend. This is called automatically by BlocFxPersistence.initialize().
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
String key) → Future< Map< String, dynamic> ?> - Read data from storage with the given key.
-
readSync(
String key) → Map< String, dynamic> ? - Read data synchronously from storage (if supported). Returns null if sync read is not supported or no data exists.
-
toString(
) → String -
A string representation of this object.
inherited
-
write(
String key, Map< String, dynamic> data) → Future<void> - Write data to storage with the given key.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited