getCachedFile method

File? getCachedFile(
  1. String url
)

Synchronously checks if a local cached file exists for url. Returns the File if it exists, or null otherwise.

Implementation

File? getCachedFile(String url) {
  final trimmedUrl = url.trim();
  if (trimmedUrl.isEmpty) return null;
  final file = _resolveFile(trimmedUrl);
  return file.existsSync() ? file : null;
}