documents method

Future<List<String>> documents()

Retrieves a list of all cache keys.

Returns a list of strings, where each string is a cache key.

Implementation

Future<List<String>> documents() async {
  final List<FileSystemEntity> entities =
      await _cacheDirectory.list().toList();
  return entities
      .whereType<File>()
      .map((file) => file.path.split('/').last)
      .toList();
}