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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -62,6 +62,9 @@ mixin CancellableImageProviderMixin<T extends Object> on CancellableImageProvide
return;
}
yield image;
} catch (e) {
PaintingBinding.instance.imageCache.evict(this);
rethrow;
} finally {
this.request = null;
}