containsKey method

Future<bool> containsKey({
  1. required String key,
})

Returns true if the storage contains the given key.

Implementation

Future<bool> containsKey({
  required String key,
}) async {
  assert(key.isNotEmpty, 'key must not be empty');
  return _synchronized(key, () async {
    await _getKeys();
    if (!_keys.contains(key)) return false;
    return performContainsKey(key: key);
  });
}