Baseflow / Baseflow/flutter_cached_network_image
Allow for setting default cache manager
- Dominant language
- Dart
- Stars
- 2.6k
- Forks
- 731
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 1
Description
## 🏗 Enhancement Proposal
Instead of passing a custom cache manager in every build method one could simply set it up in a single place.
### Pitch
This enhancement does not need to influence current code.
There are a few options for setting a cache manager (more) globally:
- Add a static field to the cache manager (nice for testing but not the prettiest
- Add an InheritedWidget to the library `CachedNetworkImageConfiguration` which allows for configuring a cache manager for a subtree. This option would also allow to add more global configuration in the future like placeholders or error builders.
And with both options the library will allow creators of alternative cache managers to enable users to use their manager without changing all instances of CachedNetworkImage.
### Platforms affected (mark all that apply)
- [ ] :iphone: iOS
- [ ] :robot: Android
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.