KVStore class

A simple key-value store that can be used to store any type of primitive.

KVStore is a wrapper around a JsonFileStore that stores a single Storable object. KVStore is not intended to be used for large data sets.

Constructors

KVStore(FutureOr<String> path)
Create a new KVStore instance with a given prefix. A unique prefix is important to avoid collisions with other KVStore instances.

Properties

hashCode int
The hash code for this object.
no setterinherited
loaded Future<void>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
delete(String id) → void
get<T>(String id) → T?
listen<T>(String id) Stream<T?>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
save<T>(String id, T value) → void
toString() String
A string representation of this object.
inherited

Operators

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