HiveAdapter constructor

HiveAdapter(
  1. TypeAdapterRegistry typeAdapterRegistry, {
  2. String? boxName,
  3. bool enableEncryption = false,
  4. String? encryptionKey,
})

Creates a new instance of HiveAdapter.

The boxName parameter is used to specify the name of the Hive box to use. If no boxName is provided, a default box name of 'data_cache_x' will be used.

Implementation

HiveAdapter(
  this.typeAdapterRegistry, {
  String? boxName,
  this.enableEncryption = false,
  String? encryptionKey,
})  : _encryptionKey = encryptionKey ?? 'default_secret_key',
      _boxName = boxName ?? 'data_cache_x';