infinite_scroll_pagination icon indicating copy to clipboard operation
infinite_scroll_pagination copied to clipboard

Question: What does pageKey exactly do?

Open Shawn-sudo opened this issue 1 year ago • 1 comments

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?

Shawn-sudo avatar Aug 30 '22 16:08 Shawn-sudo

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.

clragon avatar Sep 02 '22 20:09 clragon