fix: evict image from cache on error during image loading (#26078)

This commit is contained in:
Luis Nachtigall
2026-02-09 23:01:10 +01:00
committed by GitHub
parent 561469b826
commit 3462fc434e
@@ -62,6 +62,9 @@ mixin CancellableImageProviderMixin<T extends Object> on CancellableImageProvide
return; return;
} }
yield image; yield image;
} catch (e) {
PaintingBinding.instance.imageCache.evict(this);
rethrow;
} finally { } finally {
this.request = null; this.request = null;
} }