clear method

Future<void> clear(
  1. String fileName
)

Clears the cache for the file fileName.

Does nothing if the file was not on cache. Note: web relies on the browser cache which is handled entirely by the browser, thus this will no-op.

Implementation

Future<void> clear(String fileName) async {
  final uri = loadedFiles.remove(fileName);
  if (uri != null && !kIsWeb) {
    await File(uri.toFilePath()).delete();
  }
}