Closed ksydex closed 3 years ago
Return a high number
Return a high number
Then it will call api infinite times when items is ran out.
What happens when you reach the actual "last" page in the API? If the API returns an empty list then you can set a boolean if false (by default) then return the "high number" if it's true then return the total number of items you've fetched.
You should switch the boolean value to "true" when you get an empty list from the API.
Not the best solution but it might work for you
@hdrm147 i switched to another solution for pagination. And for me it's better solution, i.e more flexible. flutter_pagination_helper
Why should it be required? I use api that doesn't give me total items amount, how should i make it work?