clearDiskCachedImage function
Clear the disk cache image then return if it succeed.
Implementation
Future<bool> clearDiskCachedImage(String url, {String? cacheKey}) async {
try {
final File? file = await getCachedImageFile(url, cacheKey: cacheKey);
if (file != null) {
await file.delete(recursive: true);
}
} catch (_) {
return false;
}
return true;
}