Closed jamesmenera closed 4 years ago
You need to load more data on scroll end or when container with header goes outside of viewport?
@jamesmenera ?
@jamesmenera do you still need any help with this issue?) if not, I will close it later today
closing this issue, since didn't get any response. @jamesmenera feel free to reach me or open issue if you need any help
I have the same question.
I use a NotificationListener
to listen for ScrollEndNotification
.
To check whether user reached the top I use this:
if (_scrollCtrl.position.pixels.toInt() ==
_scrollCtrl.position.minScrollExtent.toInt())
But I get this error:
Unhandled Exception: Unsupported operation: Infinity or NaN toInt
@tudor07 according to docs minScrollExtent
can actually be infinite, if a scroll is infinite. If you want to load data when a user scrolls to the end of the scroll - you need to make it finite, which means that you need to define max pos/neg params, if you using InfiniteList
widget from this package, or use your delegate with items count property, hard to say without actual code)
@TatsuUkraine thanks, it worked with specifying negChildCount
and posChildCount
I apologize if I am just missing something, but how do I know that I am getting towards on end of my rendered data and to trigger a request for more? Read through the code base and it was still not clear what should trigger to make a call