Box<K, T>.regular constructor

Box<K, T>.regular(
  1. String name, {
  2. HiveCipher? encryptionCipher,
  3. bool crashRecovery = true,
  4. String? path,
  5. String? collection,
  6. LogHandler? logger,
})

Creates a strongly-typed, non-lazy, non-isolated Box.

This is the default, high-performance box type for most use cases.

Example:

final box = Box<String, MyModel>.regular('myBox');

Implementation

factory Box.regular(
  String name, {
  HiveCipher? encryptionCipher,
  bool crashRecovery = true,
  String? path,
  String? collection,
  LogHandler? logger,
}) =>
    Box<K, T>(
      name,
      type: BoxType.regular,
      encryptionCipher: encryptionCipher,
      crashRecovery: crashRecovery,
      path: path,
      collection: collection,
      logger: logger,
    );