I'm still having a bit of trouble with the layouting in Flutter.
Right now I want to have the available space shared between 3 widgets, in a quadrant layout.
The width is evenly shared (this works fine via 2 Expanded
widgets in a Row), but now I also want the height to adjust automatically so widget3.height == widget1.height + widget2.height
.
If the content of widget3
is larger, I want widget1
and widget2
to adjust their height and vice versa.
Is this even possible in Flutter?
Best Answer
Have a look at
IntrinsicHeight
; wrapping the root Row should provide the effect you're looking for:Adjusting the heights in the containers in the column cause the container on the right to resize to match:
https://gist.github.com/mjohnsullivan/c5b661d7b3b4ca00599e8ef87ff6ac61