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.
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.
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.