Skip to content

Configure load timeout for image provider #465

Open
@AAverin

Description

@AAverin

🚀 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)

  • 📱 iOS
  • 🤖 Android

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions