Baseflow / Baseflow/flutter_cached_network_image

Configure load timeout for image provider

Open
#465 3 comments 21 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

## 🚀 Feature Requests

I would like to be able to configure load timeout for CachedNetworkImageProvider.

### Contextualize the feature
When building offline functionality, I want to display thumbnail images instead of original urls if network connection was bad. I can't just lock this under `Connectivity.none`, because connectivity might be there, but it's bad or internet is not accessible.
I would like to fail fast and provide a different image in errorBuilder.

### Describe the feature
CachedNetworkImageProvider should accept optional configuration, that would allow settings network timeout for the request. It is not enough to just rely on the cache because the image that user wants to display might be a different image.

Alternatively, other features from CachedNetworkImage (like placeholder) could be added to CachedNetworkImageProvider for cases when it's not possible to use Widget – decorations, PhotoView and others.

### Platforms affected (mark all that apply)
- [x] :iphone: iOS
- [x] :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.