Reputation: 34
Is it possible to use pagination in bloc pattern?
I am getting the data from api after hitting only once. So I want to load items 10 after 10 upto 100 items on scroll without hitting api.
Any help would be appreciated!
Upvotes: 0
Views: 2424
Reputation: 8607
Yes it is possible. If your initial call to the API fetch 100 items, then you can present them 10 at a time, with or without flutter bloc.
There are many examples already avalable here on SO. You can for example search for infinite scroll to get a whole bunch of different alternatives.
https://stackoverflow.com/search?q=flutter+infinite+scroll
Upvotes: 1