BigJsonStore<T extends Storable> class

Inheritance

Constructors

BigJsonStore({required FutureOr<String> path})

Properties

eventStream Stream<StoreDataModifiedEvent<T>>
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
loaded Future<void>
A Future that completes when the store has been loaded.
no setterinherited
path FutureOr<String>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
inherited
delete(String id) → void
inherited
get(String id) → T?
Get a Storable by its id. If the Storable is not found, null is returned.
inherited
list() List<T>
Get a list of all Storable objects in the store.
inherited
listen(String id) Stream<T?>
Listen for changes to a Storable by its id. If the Storable is not found, a Stream with a single null value is returned.
inherited
listenAll() Stream<List<T>>
Listen for changes to all Storable objects in the store. The Stream will emit the current list of Storable objects when it's being listened to and all future changes to the list.
inherited
load() Future<Map<String, T>>
Load the data from persistent storage. This method is called once when the store is created.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
persistAll(Map<String, T> data) Future<void>
This is a no-op for BigJsonStore as it would be too expensive to rewrite all files on every change. Instead, the StoreDataModifiedEvent is used to update the files on change.
override
save(T value) → T
inherited
toString() String
A string representation of this object.
inherited

Operators

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