I am having trouble with implementing a Instagram type profile page, where the user can scroll his posts with pagination.
I implemented a NestedScrollView, and inside of it's body I have a GridView.builder which shows the user's post. Normally when the user scrolls to the end of the GridView, a scrollnotification is sent and the lists gets updated if there are more posts to load.
My problem comes when I added the NestedScrollView, the Sliver won't work normally if I give a scroll controller to Gridview, i.e. scrolling inside GridView only scrolls the GridView itself, it won't also scroll the NestedScrollView.
Yet if I remove the scrollController inside Gridview, I can scroll normally, but the problem arises with scrollnotifications. I have to give the NotificationListener to the NestedScrollView, and it gets called as soon as the user scrolls one line inside gridview, since from the perspective of the NestedScrollView, it is the end of the screen. So my pagination doesn't work, too many read requests get sent.
So now I am stuck with neither solution being the optimal one.