[Solved] Achieve multiple rows in gridview flutter

Question

Asked by Nbn on December 06, 2021 (source).

I am trying to get the layout as in the gif below but could not get any resource to continue with. There are two rows with multiple columns and is scrollable. How can I achieve such layout?

enter image description here

Answer

Question answered by Yeasin S (source).

As your question says, you follow this approach, and it is not containing multiple columns, items are having different width. This snippet will work fine.

SingleChildScrollView(
              scrollDirection: Axis.horizontal,
              child: Column(
                children: [
                  Row(
                    key: const ValueKey("row1"),
                    children: _items(),
                  ),
                  Row(
                    key: const ValueKey("row2"),
                    children: _items(),
                  ),
                ],
              ),
            ),
DART FLUTTER FLUTTER-LAYOUT
SHARE: