-
Notifications
You must be signed in to change notification settings - Fork 50
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] Add loading indicator while image is being loaded #34
Comments
+1 for this feature request! Adding a loading indicator or spinner widget while the image is being loaded would greatly improve the user experience. I think it would be awesome to have a loadingIndicator property that accepts a Widget. This way, developers can easily customize the spinner widget according to their design preferences. Please consider implementing this feature as it would be a valuable addition to the package and benefit the Flutter community. Thank you! |
Thank you, that sounds like a great addition. I'll try to find time for this soon. |
This adds initial support for customizing the Image widget that is being displayed. That includes customizing Image's `frameBuilder` and `loadingBuilder`. Rather than providing those callbacks as parameters, it's more versatile to let the user create their own Image widget using their desired configuration. This is now supported in `EasyImageProvider` through a new `imageWidgetBuilder` method. The default implementation shows a loading indicator and does a quick fade-in animation once the image is loaded. By using your own EasyImageProvider subclass this can be fully customized. Some tests still fail and more tests need to be added, but this is a first shot at this.
@RemonYounan @amazing-sun You can find an initial implementation here: #37 Let me know what you think of this approach. Thanks! |
@RemonYounan @amazing-sun Did you have a chance to try out #37? |
Hello @jfahrenkrug, I've had a busy few days, but I'll definitely take a look at it when I have some free time over the weekend 🤠 |
Hey @jfahrenkrug, I just checked it and using an image provider instead of a widget as an argument is a good idea. But I noticed that the loading widget doesn't appear right away. |
@amazing-sun Thank you very much for checking. Are you able to upload a video or gif of what you are seeing and adding some details of what your code looks like exactly? Thanks! |
This adds initial support for customizing the Image widget that is being displayed. That includes customizing Image's `frameBuilder` and `loadingBuilder`. Rather than providing those callbacks as parameters, it's more versatile to let the user create their own Image widget using their desired configuration. This is now supported in `EasyImageProvider` through a new `imageWidgetBuilder` method. The default implementation shows a loading indicator and does a quick fade-in animation once the image is loaded. By using your own EasyImageProvider subclass this can be fully customized. Some tests still fail and more tests need to be added, but this is a first shot at this.
GH #34: Initial work to add loading indicator
This issue is closed by this PR: #37 |
Describe the Feature
Add a loading indicator or spinner widget while the image is being loaded.
Suggested Solution
Maybe a
loadingIndicator
property can be added that accepts aWidget
. This way, while the image is loading, a custom spinner widget of our choice is displayed. I think it would be awesome to have this option added.Other Information
n/a
The text was updated successfully, but these errors were encountered: