Baseflow / Baseflow/flutter_cached_network_image

Add Image provider which takes an id, and an async function to fetch url from that id

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

Description

## 🚀 Feature Requests

Add Image provider which takes an id, and an async function to fetch url from that id as input.

### Contextualize the feature

Images stored in cloud storages (Firebase Storage, AWS S3, etc.) have async functions to get url for files stored. I need a way to check cache before getting the url, via an id (path of image on cloud storage), such that if cache has an entry for the specified id, it will load image from cache, otherwise it will fetch url for that id, and then the same steps as it does.

### Describe the feature

```dart
CachedStorageImageProvider(
String id,
Future Function(String id) fetchUrl,
)
```
The fetch url function should be called after checking cache and image not present in cache.

### 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.