dynamic fixed height for grid view in flutter
157
You can put your GridView
in some Expanded
widget and use
shrinkWrap: true,
in GridView
attribute .
So the GridView
will wrap to the Expanded
height.
Do not forget to change settings about scrolls
.
Author by
HoseinGhanbari
Updated on December 31, 2022Comments
-
HoseinGhanbari over 1 year
I need a 2*2 GridView which always take as much height as it needed to display the 2*2 grid. but the problem is that I have to specify a fixed height which cause undesired layout / scrolling.
-
HoseinGhanbari over 2 years
-