HiveInterface class abstract
The main API interface of Hive. Available through the Hive
constant.
- Implemented types
- Available extensions
Constructors
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
-
box<
E> (String name) → Box< E> - Returns a previously opened box.
-
boxExists(
String name, {String? path}) → Future< bool> - Checks if a box exists
-
close(
) → Future< void> - Closes all open boxes.
-
deleteBoxFromDisk(
String name, {String? path}) → Future< void> - Removes the file which contains the box and closes the box.
-
deleteFromDisk(
) → Future< void> - Deletes all currently open boxes from disk.
-
generateSecureKey(
) → List< int> - Generates a secure encryption key using the fortuna random algorithm.
-
ignoreTypeId<
T> (int typeId) → void -
Ignore type
inherited
-
init(
String path) → void - Initialize Hive by giving it a home directory.
-
initFlutter(
[String? subDir]) → Future< void> -
Available on HiveInterface, provided by the HiveX extension
Initializes Hive with the path fromgetApplicationDocumentsDirectory
. -
isAdapterRegistered(
int typeId) → bool -
Returns true if a TypeAdapter is registered
inherited
-
isBoxOpen(
String name) → bool - Checks if a specific box is currently open.
-
lazyBox<
E> (String name) → LazyBox< E> - Returns a previously opened lazy box.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openBox<
E> (String name, {HiveCipher? encryptionCipher, KeyComparator keyComparator = defaultKeyComparator, CompactionStrategy compactionStrategy = defaultCompactionStrategy, bool crashRecovery = true, String? path, Uint8List? bytes, List< int> ? encryptionKey}) → Future<Box< E> > - Opens a box.
-
openLazyBox<
E> (String name, {HiveCipher? encryptionCipher, KeyComparator keyComparator = defaultKeyComparator, CompactionStrategy compactionStrategy = defaultCompactionStrategy, bool crashRecovery = true, String? path, List< int> ? encryptionKey}) → Future<LazyBox< E> > - Opens a lazy box.
-
registerAdapter<
T> (TypeAdapter< T> adapter, {bool internal = false, bool override = false}) → void -
Register a TypeAdapter to announce it to Hive.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited