HiveStore class
Constructors
- HiveStore([Box? box])
-
Creates a HiveStore initialized with the given
box
, defaulting toHive.box(defaultBoxName)
Properties
- box → Box
-
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 presetoverride -
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 keydataId
override -
putAll(
Map< String, Map< data) → voidString, dynamic> ?> -
put all entries from
data
into the storeoverride -
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> -
Opens a box. Convenience pass through to
Hive.openBox
.
Constants
- defaultBoxName → const String
-
Default box name for the
graphql/client.dart
cache store (graphqlClientStore
)