HydratedStorage class
Implementation of Storage which uses package:hive_ce to persist and retrieve state changes from the local device.
- Implemented types
Constructors
- HydratedStorage(Box _box)
- Implementation of Storage which uses package:hive_ce to persist and retrieve state changes from the local device.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clear(
) → Future< void> -
Clears all key value pairs from storage
override
-
close(
) → Future< void> -
Close the storage instance which will free any allocated resources.
A storage instance can no longer be used once it is closed.
override
-
delete(
String key) → Future< void> -
Deletes key value pair
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
String key) → dynamic -
Returns value for key
override
-
toString(
) → String -
A string representation of this object.
inherited
-
write(
String key, dynamic value) → Future< void> -
Persists key value pair
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- hive ↔ HiveInterface
-
Internal instance of
HiveImpl
. It should only be used for testing.getter/setter pair
Static Methods
-
build(
{required HydratedStorageDirectory storageDirectory, HydratedCipher? encryptionCipher}) → Future< HydratedStorage> -
Returns an instance of HydratedStorage.
storageDirectory
is required.