Baseflow / Baseflow/flutter_cached_network_image

Allow for setting default cache manager

Open
#417 0 comments 10 reactions 0 assignees View on GitHub
type: enhancement
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.