I want to make pages like 1,2,3 from firestore documents. But don't know what to do!
So I need pagination functionality like this :
- if the total number of documents in the collection is 26 then it should be divided into 3 pages, as 0-9, 11-19, 20- 26 documents
- when I click on page no 2 it should fetch 11-19 documents.
So here I also need to find how many documents are there so I can make pages (like 1,2,3) from that
What I tried
- I tried firebase's official doc firebase query cursor
- I also tried the paginate_firestore plugin (but It is not compatible with my requirement)
- If I am on the 1st page and go to the 3rd page directly, it should fetch 21-26 records (as per example given above)
What I want
- for example: when we search in google, at bottom of the page there are pages as (1,2,3 more) so I want similar to this