newHiveDefaultVaultStore function

Future<HiveDefaultVaultStore> newHiveDefaultVaultStore({
  1. String? path,
  2. StoreCodec? codec,
  3. HiveCipher? encryptionCipher,
  4. bool? crashRecovery,
})

Creates a new HiveDefaultVaultStore

  • path: The base storage location for this store, the current directoy if not provided
  • codec: The StoreCodec used to convert to/from a Map<String, dynamic>` representation to a binary representation
  • encryptionCipher: The encryption cypher
  • crashRecovery: If it supports crash recovery

Implementation

Future<HiveDefaultVaultStore> newHiveDefaultVaultStore(
    {String? path,
    StoreCodec? codec,
    HiveCipher? encryptionCipher,
    bool? crashRecovery}) {
  return HiveDefaultAdapter.build(
          path: path ?? '.',
          encryptionCipher: encryptionCipher,
          crashRecovery: crashRecovery)
      .then((adapter) => HiveDefaultVaultStore(adapter, codec: codec));
}