How can I resize the image widgets while maintaing the aspect ratio of all the widgets inside a row?
Wrap widget is what you need with of course little customization as well.
What is it do does is basically wrap all the widgets in a single row with spaces that you want with width dynamically. Give it shot!
Shourya Shikhar
Currently in love with:Flutter, Data Structures and Open Source Always have been in love with:Music
Updated on January 04, 2023Comments
-
Shourya Shikhar over 1 year
I wanted to design this UI using
Row
:I have a similar scenario where I don't know the size and orientation of the images. This is what I can think of: Put all the image widgets and wrap it within a row. But since I don't know the size as well as the orientation of the images, the widgets will not be properly placed as in the above image.
I've tried resizing the images by using scale factor. But since the size varies, the images are never uniformly scaled. Also whenever the orientation is different for a particular image, the UI ca not scale itself accordingly.
I would like to get an idea on how can this type of UI can be created in Flutter?
Note: I don't own the copyrights of the image. Using this screenshot for only educational purpose from here.
-
Zac over 2 yearsHave you tried using the AspectRatio widget along with the IntrinsicHeight/Width widgets?
-