How do I get a GridView inside a TabBarView?

Viewed 86

I want to achieve following layout in a flutter app:

  1. App bar
  2. Text widget
  3. Row of chip widgets
  4. Tab bar with three labels
  5. Three tab views with each one ElevatedButton and a GridView.

The debugger starts bleeding once I try to place the GridView inside the tab view. The debugger complains about 'hasSize' etc.

As far as I know the problem is that I use GridView inside SingleChildScrollView. After that I tried many things, using CustomScrollView and slivers. But it got uglier and uglier. I used SingleChildScrollView because I want the view to be scrollable as far as the GridView goes. I would appreciate it if someone who did something similar guided me to the right direction.

Here's an image of what I try to get:

image

0 Answers
Related