Storage<KeyT extends Object?, EncodedT extends Object?> constructor
Storage<KeyT extends Object?, EncodedT extends Object?> ()
An interface to enable Riverpod to interact with a database.
This is used in conjunction with NotifierPersistX.persist to enable persistence for a notifier.
Storages are generally implemented by third-party packages.
Riverpod provides an official implementation of Storage that stores data
using SQLite, in the riverpod_sqflite
package.
See also:
- Offline persistence.
- riverpod_sqflite for an implementation of Storage that uses SQLite.
Implementation
Storage() {
deleteOutOfDate();
}