containsKey method

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

Returns true if the key has a corresponding value, false otherwise. For secure storage, iOptions and aOptions allow more control on the data access policy.

Implementation

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