Closed tas-unn closed 1 year ago
You should not be using NeverScrollableScrollPhysics
nor shrinkWrap
for ListViews.
That is essentially just a Column
.
Additionally, PagedListView
only works correctly when not shrinkWrap
ped.
To avoid the sizing error use a Expanded
around it when inside a Column
.
Guys, I was also shrink-wrapping the list and basically the new page event was being fired for all pages consecutively without scrolling. I was doing it to include this list on a Profile section feed of a social network. It has the user info on top then the infinite scroll, like an Instagram feed, where the profile scrolls like it was part of the list.
Apparently normally this would be done with a NestedScrollView in Flutter, but for lists that have their own controller like in this case, NestedScrollView doesn't work properly, the scrolling experience is a bit broken.
So I wanted to know, is it possible to implement this behavior when using infinite scroll pagination in a PagedListView?
Thank you for any help and for library too, very useful.
Sorry, for the record, I was confused between PagingController and ScrollController. This list has its own PagingController, the infinite scroll pagination controller, but not its own ScrollingController, which makes it compatible with the NestedScrollView. In my case the issue was that the infinite scrolling list had to have primary: true
and I'd had set it to false while trying other stuff.
I have a file with this structure: https://jsoneditoronline.org/#left=cloud.5c3ee044771a4f25ab22407409e0da1b (number of items in "listlevel1" may vary and reach up to 2000) How can I make sure that my list loads correctly as I go down? I have now done that it is loaded by 20 elements, but the whole list at once
`
`