has method

Future<bool> has(
  1. String key
)

Checks if a specific key exists in the cache.

key is the unique identifier to check for.

Returns true if the key exists, false otherwise. Returns false on web platform.

Implementation

Future<bool> has(String key) async {
  if (!isAvailable) return false;
  return _fileFor(key).exists();
}