HiveStore class

Inheritance
Annotations
  • @immutable

Constructors

HiveStore([Box<Map?>? box])
Creates a HiveStore initialized with the given box, defaulting to Hive.box(defaultBoxName)

Properties

box → Box<Map?>
Direct access to the underlying Box.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

delete(String dataId) → void
Delete the value of the dataId from the store, if preset
override
get(String dataId) Map<String, dynamic>?
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put(String dataId, Map<String, dynamic>? value) → void
Write value into this store under the key dataId
override
putAll(Map<String, Map<String, dynamic>?> data) → void
put all entries from data into the store
override
reset() Future<void>
Empty the store
override
toMap() Map<String, Map<String, dynamic>?>
Return the entire contents of the cache as Map.
override
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

init({required String onPath}) → void
Init Hive on specific Path
open({String boxName = defaultBoxName, String? path}) Future<HiveStore>
Convenience factory for HiveStore(await openBox(boxName ?? 'graphqlClientStore', path: path))
openBox(String boxName, {String? path}) Future<Box<Map?>>
Opens a box. Convenience pass through to Hive.openBox.

Constants

defaultBoxName → const String
Default box name for the graphql/client.dart cache store (graphqlClientStore)