HiveCache<K, T> class

Implemented types

Constructors

HiveCache({required Box box, required HiveModelLoader<T> loader})

Properties

box → Box
final
hashCode int
The hash code for this object.
no setterinherited
loader HiveModelLoader<T>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() Future<void>
Truncates all data in the data source.
override
delete(K key) Future<void>
Removes an item from the data source.
override
exists(K key) Future<bool>
Checks if an element exists
override
keys() Future<List<K>>
Returns a list of all keys in the data source.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(K key) Future<T>
Reads a value from the data source. This will raise a CacheException if the value does not exist,
override
toString() String
A string representation of this object.
inherited
values() Future<List<T>>
Returns a list of all values in the data source.
override
write(K key, T data) Future<void>
Writes a value to the data source.
override

Operators

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