clear method
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();
}
}