Flutter: ListView inside ListView don't scroll
277
If you want to have the inner ListView
be scrollable independently of the main scroll view, you should use NestedScrollView
.
Please check more info here
Author by
Dani Herrero
Updated on December 21, 2022Comments
-
Dani Herrero over 1 year
I want to nest a ListView inside a ListView.
Here's the code:
return ScrollablePositionedList.builder( itemScrollController: itemScrollController, itemPositionsListener: itemPositionListener, itemCount: widget.favouritesCategories.length, itemBuilder: (BuildContext context, int index) { return CategoryPublicationList(favouriteCategory: widget.favouritesCategories[index]); });
This ListView work fine but
return ListView.builder( shrinkWrap: true, itemCount: publications.length, itemBuilder: (BuildContext context, int index) { return PublicationWidget(publication: publications[index]); });
Insided ListView don't scroll. Can somebody help me, please?
-
Dani Herrero almost 4 yearsA CustomScrollView where inside there is a SliverList and inside this SliverList the inner SliverList?
-
theshivamlko almost 4 yearsAll SliverWidgets can be used only within CustomScrollView, can you UI what u want to acheive
-
Dani Herrero almost 4 yearsI've push an image, some idea? It's a list that for each item there is another list when you click