You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the title says, if CachedNetworkImage with maxHeightDiskCache (or maxWidthDiskCache) fails to load an image (403, etc.), errorWidget is called the first time, but not the next time.
I think it is probably due to the fact that the image that failed to load is cached, but is there a solution?
I would like to add that I have tried deleting the cache, but it is not possible to do so.
Thanks for the answer.
Expected behavior
Images that fail to load are not cached.
Reproduction steps
returnCachedNetworkImage(
imageUrl: path, // Path of the image that results in a 403 error
width:128,
height:128,
maxWidthDiskCache:128,
maxHeightDiskCache:128,
errorWidget: (context, url, error) {
// First time through, but after that it goes through.returnconstSizedBox.shrink();
},
placeholder: (context, url) {
// errorWidget is not called, so it is here to stayreturnconstCircularProgressIndicator();
},
imageBuilder: (context, imageProvider) {
// omission
},
errorListener: (value) async {
// It tries to delete the cache, but it is always false.final result =CachedNetworkImage.evictFromCache(path);
print('delete cache: $result'); // delete cache: false
},
);
Configuration
Version:
Flutter: 3.24.3
cached_network_image: 3.4.1
Platform:
📱 iOS
🤖 Android
The text was updated successfully, but these errors were encountered:
🐛 Bug Report
As the title says, if CachedNetworkImage with maxHeightDiskCache (or maxWidthDiskCache) fails to load an image (403, etc.), errorWidget is called the first time, but not the next time.
I think it is probably due to the fact that the image that failed to load is cached, but is there a solution?
I would like to add that I have tried deleting the cache, but it is not possible to do so.
Thanks for the answer.
Expected behavior
Images that fail to load are not cached.
Reproduction steps
Configuration
Version:
Platform:
The text was updated successfully, but these errors were encountered: