rx_storage library

Support for doing something awesome.

More dartdocs go here.

Classes

ClearFailureEvent<Key extends Object, Options>
Clear storage failed.
ClearSuccessEvent<Key extends Object, Options>
Clear storage successfully.
KeyAndValue<K extends Object, V>
Pair of key and value.
KeysChangedEvent<Key extends Object, Options>
Key changed when mutating storage.
OnDataStreamEvent<Key extends Object, Options>
Stream emits new data event.
OnErrorStreamEvent<Key extends Object, Options>
Stream emits error event.
ReadAllFailureEvent<Key extends Object, Options>
Read all values failed.
ReadAllSuccessEvent<Key extends Object, Options>
Read all values successfully.
ReadValueFailureEvent<Key extends Object, Options>
Read value failed.
ReadValueSuccessEvent<Key extends Object, Options>
Read value successfully.
RealRxStorage<Key extends Object, Options, S extends Storage<Key, Options>>
Default RxStorage implementation.
RemoveFailureEvent<Key extends Object, Options>
Remove failed.
RemoveSuccessEvent<Key extends Object, Options>
Remove successfully.
RxStorage<Key extends Object, Options>
Get Streams by key from persistent storage.
RxStorageDefaultLogger<Key extends Object, Options>
Default Logger's implementation, simply print to the console.
RxStorageEmptyLogger<Key extends Object, Options>
Log nothing :)
RxStorageError
An Object which acts as a tuple containing both an error and the corresponding stack trace.
RxStorageLogger<Key extends Object, Options>
Log messages about operations (such as read, write, value change) and stream events.
RxStorageLoggerEvent<Key extends Object, Options>
Event when reading, writing storage.
Storage<Key extends Object, Options>
A persistent store for simple data. Data is persisted to disk asynchronously.
TransactionalStorage<Key extends Object, Options>
A persistent store for simple data. Data is persisted to disk asynchronously and transactionally.
WriteFailureEvent<Key extends Object, Options>
Write failed.
WriteSuccessEvent<Key extends Object, Options>
Write successfully.

Extensions

MapToListOfKeyAndValuesExtension on Map<Key, Object?>
Convert a map to list of KeyAndValues.

Typedefs

Decoder<T> = FutureOr<T> Function(Object? o)
Convert storage persisted type to T. This is used in Storage.read.
Encoder<T> = FutureOr<Object?> Function(T t)
Convert T to a value of type that can be persisted in Storage. This is used in Storage.write.
Transformer<T> = FutureOr<T> Function(T)
Transform a value to another value of the same type.