Repo<TKey, TVal> class abstract

Implementers

Constructors

Repo()

Properties

boxName String
The name of the box.
no setter
firstOrNullKey → TKey?
get the first key, or null if the box is empty
no setter
hashCode int
The hash code for this object.
no setterinherited
keys Iterable<TKey>
All the keys in the box.
no setter
keySet Set<TKey>
get the existing keys as a Set of unique values
no setter
keySetStream Stream<Set<TKey>>
a stream that tracks keySet when it changes
no setter
keyStream Stream<Iterable<TKey>>
a stream that tracks keys when it changes
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

assignAll(Map<TKey, TVal> newValues) Future<void>
Clears the box then sets the keys and values provided in newValues.
clear() Future<void>
Deletes all the data in the box.
dataStreamFor(Iterable<TKey> keys) Stream<Map<TKey, TVal>>
watch for multiple keys, the result map will only contain (key,value) pairs that are NOT deleted
deleteKeys(Iterable<TKey> keys) Future<void>
Deletes the keys provided in keys.
dispose() Future<void>
Closes the box.
firstEntryStream([Duration debounceDuration = const Duration(milliseconds: 200)]) Stream<MapEntry<TKey, TVal>?>
Stream that emits firstOrNull on every change for the box, with an optional debounce
init() Future<void>
Initializes the repository.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put(TKey key, TVal newValue) Future<void>
Updates the value at the given key to newValue.
putAll(Map<TKey, TVal> newValues) Future<void>
Sets the keys and values provided in newValues.
putAllAndUpdateExisting(Map<TKey, TVal> newValues, void mutateExisting(TKey key, TVal mutateMe, TVal newValueReadOnly)) Future<void>
Same as putAll, but instead of removing old objects, changes (mutates) their values to new values
putAllAndUpdateExistingMapped<TMapped>(Map<TKey, TMapped> newValues, TVal mutateExisting(TKey key, TVal? mutateMe, TMapped newValue)) Future<void>
Same as putAllAndUpdateExisting but mutateExisting can receive a null existing value
putAndUpdateExisting(TKey key, TVal newValue, void mutateExisting(TKey key, TVal? mutateMe, TVal newValueReadOnly)) Future<void>
Same as put, but instead of removing old object, changes (mutates) its values to newValue
toString() String
A string representation of this object.
inherited
watch({TKey? key}) Stream<BoxEvent>
watch the dataBox for changes to a specific key, use dataStreamFor instead

Operators

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