Home > database >  How to add Two listview in one listview into the pageview builder flutter
How to add Two listview in one listview into the pageview builder flutter

Time:07-23

I used two listView inside listview,when i put the overall listview inside the pageview, the pageview is not scrolable

CodePudding user response:

Instead of using Listviews inside each other, I suggest you to use a GridView. I think your ListViews have different directions. If they do, GridViews will help you.

Other solution, if you insist on using ListView, then wrap the ListViews with ConstrainedBox then give them BoxConstraints

ConstrainedBox(
  constraints: BoxConstraints(maxHeight: 100, maxWidth: 200)
  child: ListView(),
)

You should adjust maxHeight and maxWidth in the proper size.

Hope this helps.

CodePudding user response:

it looks like you are looking for sliverlist

SliverList & SliverGrid

or sliver tool

sliver_tools

  • Related