Closed TolinhoCTO closed 2 weeks ago
Hello!
In FlutterFlow, the infinite scroll index starts at 0. To start from 1 instead, you can add a code expression to the infinite scroll variable that increments the index value by 1. This adjustment ensures that the pagination starts at 1 and prevents the first page from repeating.
Already tried it, and not working
It doesn't explain the fact that it loads 1,2,3,4 and 1 again
You can take this project as an example: https://app.flutterflow.io/project/qa-1385-b9jn2m
This is the result:
https://qa1385-photos.flutterflow.app/
yes but you have ilimited photos on this example how can you ensure that at the end it doesn't load the first page again ?
Okay it worked thank you a lot sorry for the problem but for anyone who comes here don't do code expression like this: var1(next index) + 1 but do var1(next index) + var2(1)
I’m glad everything is working as expected now! I’ll go ahead and close this issue, but if you encounter anything else, please don’t hesitate to open a new one!
Can we access your project?
Current Behavior
Hi,
So I am making an api call to populate a listview, my api call take pagination to show a limited number of elements. On flutterflow I enabled the infinite scroll view to load one page at the time. The problem is when reaching the end of the list it loads the first page again. Even tried with longer list and the same problem appears so it loads like this page: 1,2,3,4,1
I precise that even without other parameters the problem still happens, even without pull to refresh. I have seen someone going around this problem but for a firestore collection and not an api call. Which is looking like a bug or at best a lack of information on how to set up infinite scroll
Expected Behavior
I would like each page to only load once in infinite scroll.
Steps to Reproduce
Reproducible from Blank
Bug Report Code (Required)
ITFXi/Hl34Z1oeZE1rqAK8ZsniYwGUwbUOc7j9VEGAsjCePqEIl3O+PBXFdocuqHYAliGWf+rEk1wtbOi+LpIfICGz+ZfLp41ap9UxDgLUWWacm7PpC0f3QmBfNRG2aC0J6nuRQkBMZtL2QMwU+DfeyQb3qCf9qOYwx5e6fDbOY=
Visual documentation
https://github.com/user-attachments/assets/d5a7c5d9-0c49-4554-b60e-479dbf6476db
Environment
Additional Information
No response