Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide Image Info in imageBuilder() Method #923

Open
2 tasks
Ultranmus opened this issue Feb 2, 2024 · 0 comments
Open
2 tasks

Provide Image Info in imageBuilder() Method #923

Ultranmus opened this issue Feb 2, 2024 · 0 comments

Comments

@Ultranmus
Copy link

Ultranmus commented Feb 2, 2024

馃殌 Feature Requests

I have a feature request that I believe would enhance the package's usability. Specifically, it would be immensely helpful if the imageBuilder() method could provide information about the loaded image(ImageInfo) . Currently, users need to implement a separate completer and utilize a FutureBuilder to obtain image dimensions. However, this approach not only introduces additional complexity but also poses challenges in scenarios where the image failed to load initially due to internet connectivity issues; in such cases, the image is not automatically reloaded when the internet connection is restored.

CachedNetworkImage(
     imageUrl : url,
     imageBuilder(context, imageProvider, imageInfo){}
)

By incorporating image info directly into the imageBuilder() method, users could dynamically adjust the aspect ratio based on the image's size without the need for additional asynchronous handling (Beneficial for users who wish to dynamically adjust the aspect ratio based on whether the loaded image is in portrait or landscape orientation.).

Platforms affected (mark all that apply)

  • 馃摫 iOS
  • 馃 Android
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant