allow method

KeyValueStore allow(
  1. List<KeyValueStorePermission> permissions
)

Implementation

KeyValueStore allow(List<KeyValueStorePermission> permissions) {
  if (permissions.isEmpty) {
    throw "Must supply at least one permission for key value store $name";
  }

  unawaited(registerPolicy((permissions)).onError((error, stackTrace) {
    print(error);
  }));

  return KeyValueStore(name);
}