Baseflow / Baseflow/flutter_cached_network_image

Consider overwriting evict

Open
#706 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Dart
Stars
2.6k
Forks
731
Avg merge
3d 9h
Merged PRs (30d)
1

Description

## 🏗 Enhancement Proposal

Spent a good amount of time trying to debug why an updated image on the backend for the same URL still showed the previous image even when evicting and destroying the object.

Only found out i had to use `CachedNetworkImage.evictFromCache(url)` by stumbling upon [this issue](https://github.com/Baseflow/flutter_cached_network_image/issues/390).

### Pitch
Would it make sense to have this as default behaviour with something like:
```dart
// inside cached_network_image_provider.dart

@override
Future evict({ImageCache? cache, ImageConfiguration configuration = ImageConfiguration.empty}) async {
await CachedNetworkImage.evictFromCache(url);
return super.evict(cache: cache, configuration: configuration);
}
```

### Platforms affected (mark all that apply)
- MacOS
- Probably others

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.