infinite_scroll_pagination
infinite_scroll_pagination copied to clipboard
Question: What does pageKey exactly do?
Hi, I'm just wondering what pageKey
exactly do in .addPageRequestListener((pageKey) {})
and .appendPage([items_here], nextPageKey)
.
README only shows how to use it (like when appending a page, nextPageKey = pageKey + newItems.length), and everything seems to work fine even when I just put any random number for pageKey
and nextPageKey
, so what do they do?
pageKey tells you which page you are on. this can be anything from a number going up to a string that tells the database cursor where it is. putting random numbers into it doesnt really make any sense, because you lose orientation in your pagination.