How to determine the width and height of an image in Flutter?

Posted by Andre Scott | Updated on

Want to determine the width and height of an image in Flutter? With the new version of flutter old solution is obsolete. Now the addListener needs an ImageStreamListener.

If you already have an Image widget, you can read the ImageStream out of it by calling resolve on its ImageProvider.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers