newHiveDefaultCacheStore function
Creates a new HiveDefaultCacheStore
path
: The base storage location for this store, the current directoy if not providedcodec
: TheStoreCodec
used to convert to/from a Map<String, dynamic>` representation to a binary representationencryptionCipher
: The encryption cyphercrashRecovery
: If it supports crash recovery
Implementation
Future<HiveDefaultCacheStore> newHiveDefaultCacheStore(
{String? path,
StoreCodec? codec,
HiveCipher? encryptionCipher,
bool? crashRecovery}) {
return HiveDefaultAdapter.build(
path: path ?? '.',
encryptionCipher: encryptionCipher,
crashRecovery: crashRecovery)
.then((adapter) => HiveDefaultCacheStore(adapter, codec: codec));
}