provision static method
- required String uri,
- StoreKeyMethod? keyMethod,
- String? passKey,
- String? profile,
- required bool recreate,
Provisions a new store.
Throws an AskarStoreException if provisioning fails.
Implementation
static Future<Store> provision({
required String uri,
StoreKeyMethod? keyMethod,
String? passKey,
String? profile,
required bool recreate,
}) async {
try {
final storeHandle =
(await askarStoreProvision(
uri,
recreate: recreate,
keyMethod: keyMethod,
passKey: passKey,
profile: profile,
)).getValueOrException();
return Store(storeHandle, uri);
} catch (e) {
throw AskarStoreException('Error on store provision: $e');
}
}