evict method
Removes the file from the cache.
Implementation
@override
Future<void> evict({required String key}) async {
Directory tempDir = await getTemporaryDirectory();
String tempPath = tempDir.path;
String base64Key = base64.encode(utf8.encode(key));
File cacheDetailsFile = File('$tempPath/$base64Key.json');
File cacheContentFile = File('$tempPath/$base64Key.bin');
if(cacheDetailsFile.existsSync()) {
cacheDetailsFile.deleteSync();
}
if(cacheContentFile.existsSync()) {
cacheContentFile.deleteSync();
}
}