RxStorage<Key extends Object, Options> class
abstract
Get Streams by key from persistent storage.
- Implemented types
-
- TransactionalStorage<
Key, Options>
- TransactionalStorage<
- 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(
[Options? options]) → Future< void> -
Completes with true once the storage for the app has been cleared.
inherited
-
containsKey(
Key key, [Options? options]) → Future< bool> -
Returns a future complete with value true if the persistent storage
contains the given
key
.inherited -
dispose(
) → Future< void> - Clean up resources - Closes the streams.
-
executeUpdate<
T extends Object> (Key key, Decoder< T?> decoder, Transformer<T?> transformer, Encoder<T?> encoder, [Options? options]) → Future<void> -
Read–modify–write
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
observe<
T extends Object> (Key key, Decoder< T?> decoder, [Options options]) → Stream<T?> - Return Stream that will emit value read from persistent storage. It will automatic emit value when value associated with key was changed.
-
observeAll(
[Options options]) → Stream< Map< Key, Object?> > - Return Stream that will emit all values associated with key read from persistent storage. It will automatic emit all keys when any value was changed.
-
read<
T extends Object> (Key key, Decoder< T?> decoder, [Options? options]) → Future<T?> -
Reads a value of any type from persistent storage.
inherited
-
readAll(
[Options? options]) → Future< Map< Key, Object?> > -
Returns all keys in the persistent storage.
inherited
-
remove(
Key key, [Options? options]) → Future< void> -
Removes an entry from persistent storage.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
update<
T extends Object> ({required Key key, required Decoder< T?> decoder, required Transformer<T?> transformer, required Encoder<T?> encoder, Options? options}) → Future<void> -
Read–modify–write
.inherited -
write<
T extends Object> (Key key, T? value, Encoder< T?> encoder, [Options? options]) → Future<void> -
Saves a
value
to persistent storage.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited