clearMemoryImageCache function
clear all of image in memory
Implementation
void clearMemoryImageCache([String? name]) {
if (name != null) {
if (imageCaches.containsKey(name)) {
imageCaches[name]!.clear();
imageCaches[name]!.clearLiveImages();
imageCaches.remove(name);
}
} else {
PaintingBinding.instance.imageCache.clear();
PaintingBinding.instance.imageCache.clearLiveImages();
}
}