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. Uint8List? bytes,
  8. String? collection,
  9. @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,
  Uint8List? bytes,
  String? collection,
  @Deprecated('Use encryptionCipher instead') List<int>? encryptionKey,
});