delete method

Future<bool> delete({
  1. required String key,
  2. IOSOptions? iOptions,
  3. AndroidOptions? aOptions,
})

Deletes the value corresponding to the key. For secure storage, iOptions and aOptions allow more control on the data access policy.

Implementation

Future<bool> delete({
  required String key,
  IOSOptions? iOptions,
  AndroidOptions? aOptions,
}) async {
  if (isMocking) {
    mockEntries!.remove(key);
    return true;
  }
  return _storage.delete(
    key: key,
    iOptions: iOptions ?? _iosOptions,
    aOptions: aOptions ?? _androidOptions,
  );
}