openBox<E> abstract method

Future<Box<E>> openBox<E>(
  1. String name, {
  2. HiveCipher? encryptionCipher,
  3. KeyComparator keyComparator = defaultKeyComparator,
  4. CompactionStrategy compactionStrategy = defaultCompactionStrategy,
  5. bool crashRecovery = true,
  6. String? path,
  7. @Deprecated('Use [backend] with a [StorageBackendMemory] instead') Uint8List? bytes,
  8. StorageBackend? backend,
  9. String? collection,
  10. @Deprecated('Use encryptionCipher instead') List<int>? encryptionKey,
})

Opens a box.

If the box is already open, the instance is returned and all provided parameters are being ignored.

Implementation

Future<Box<E>> openBox<E>(
  String name, {
  HiveCipher? encryptionCipher,
  KeyComparator keyComparator = defaultKeyComparator,
  CompactionStrategy compactionStrategy = defaultCompactionStrategy,
  bool crashRecovery = true,
  String? path,
  @Deprecated('Use [backend] with a [StorageBackendMemory] instead')
  Uint8List? bytes,
  StorageBackend? backend,
  String? collection,
  @Deprecated('Use encryptionCipher instead') List<int>? encryptionKey,
});