New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FirestoreListView Pagination does not work #111
Comments
I also see that more items are loaded than the page size that is set using the plugin example app. |
Hi @oruclu - You have the debugPrint statement inside the builder function. I believe it would only help understand how many elements are rendered at the UI, and not necessarily the number of reads from Firebase Firestore. Happy to be corrected though. ListView Builder also tends to render more elements than shown in the viewport based on the cacheExtent property. Can you try making the height of your post widget to say 900( or something that covers the viewport depending on your test device), and see if it's printing out all 30 ? I think a better place for print statement would be at _listenQuery method inside _FirestoreQueryBuilderState Class in firebase_ui_firestore/lib/src/query_builder.dart. And, I can see that pagination still fails by trying to download all the previously downloaded entries from firebase firestore again. Looks like a fix using query cursors would be the way to go. As of now, I'm getting something like this with the debug statement inside _listenQuery (as in the above screenshot) and the one from builder function.
|
As an aside, it would be great if the pagination state/logic was completely encapsulated in
|
Is there an existing issue for this?
What plugin is this bug for?
Firebase UI Firestore
What platform(s) does this bug affect?
No response
List of dependencies used.
flutter pub deps -s list
transitive dependencies:
Steps to reproduce
Expected Behavior
I view the posts I printed with debugPrint in the DEBUG CONSOLE. I see all the posts shared by the user. Post count exceeds 30, even though pageSize is 10. Pagination not work
Actual Behavior
What I expect from FirestoreListView is to bring enough items from firebase firestore to fit on the screen, like ListView.builder.
Additional Information
The text was updated successfully, but these errors were encountered: