clearDiskCachedImage function

Future<bool> clearDiskCachedImage (
  1. String url
)

clear the disk cache image then return if it succeed.

clear specific one

Implementation

Future<bool> clearDiskCachedImage(String url) async {
  try {
    final File file = await getCachedImageFile(url);
    if (file != null) {
      await file.delete(recursive: true);
    }
  } catch (_) {
    return false;
  }
  return true;
}