SharedPreferencesStorage class

SharedPreferences implementation of BlocStorage.

This is the default storage implementation that uses SharedPreferences for persisting state data.

Implemented types

Constructors

SharedPreferencesStorage()

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.
override
delete(String key) → Future<void>
Delete data associated with the given key.
override
init() → Future<void>
Initialize the storage backend. This is called automatically by BlocFxPersistence.initialize().
override
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.
override
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.
override
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.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited