onFinishedLoading image custom callback function
🚀 Feature Requests
The title speaks for itself
Hmm not really. What do you want and why?
Hmm not really. What do you want and why?
When we need any specific functionality to perform post image load. Eg - https://stackoverflow.com/questions/44665955/how-do-i-determine-the-width-and-height-of-an-image-in-flutter
yeah!I Hope you can add this callback.because I need show a button after the image loaded in ad page. @renefloor
Agree, this functionality will become more and more vital as more people use this.
I too need to get image dimensions as well as change the state of app when an image loads.
Much thanks if this can become reality
any work around?
For context: I'm using regular Image widget and providing the image for it with CachedNetworkimageProvider. I pulled the provider into a variable and then added an ImageStreamListener to it. The ImageStreamListener has an onImage callback which gives you the ImageInfo object with original dimensions of the loaded image.
Example:
late CachedNetworkImageProvider provider;
@override
void initState() {
super.initState();
provider = CachedNetworkImageProvider(imageUrl);
provider.resolve(const ImageConfiguration()).addListener(ImageStreamListener((image, __) {
print('Image is $image');
}));
}