firebase / FirebaseUI-Flutter

Apache License 2.0
93 stars 81 forks source link

FirestoreListView Pagination does not work #111

Closed oruclu closed 2 weeks ago

oruclu commented 10 months ago

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
  - flutter 0.0.0
  - characters 1.3.0
  - collection 1.17.2
  - material_color_utilities 0.5.0
  - meta 1.9.1
  - vector_math 2.1.4
  - web 0.1.4-beta
  - sky_engine any
- flutter_localizations 0.0.0
  - flutter any
  - intl 0.18.1
  - characters 1.3.0
  - clock 1.1.1
  - collection 1.17.2
  - material_color_utilities 0.5.0
  - meta 1.9.1
  - path 1.8.3
  - vector_math 2.1.4
  - web 0.1.4-beta
- cupertino_icons 1.0.6
- url_launcher 6.1.13
  - flutter any
  - url_launcher_android ^6.0.13
  - url_launcher_ios ^6.0.13
  - url_launcher_linux >=2.0.0 <4.0.0
  - url_launcher_macos >=2.0.0 <4.0.0
  - url_launcher_platform_interface ^2.1.0
  - url_launcher_web ^2.0.0
  - url_launcher_windows >=2.0.0 <4.0.0
- share_plus 6.3.4
  - cross_file ^0.3.3+2
  - meta ^1.7.0
  - mime ^1.0.2
  - flutter any
  - flutter_web_plugins any
  - share_plus_platform_interface ^3.2.0
  - file ^6.0.0
  - url_launcher_web ^2.0.13
  - url_launcher_windows ^3.0.1
  - url_launcher_linux ^3.0.1
  - url_launcher_platform_interface ^2.1.1
  - ffi ^2.0.1
  - win32 ^3.0.0
- firebase_core 2.15.1
  - firebase_core_platform_interface ^4.8.0
  - firebase_core_web ^2.7.0
  - flutter any
  - meta ^1.8.0
- firebase_auth 4.9.0
  - firebase_auth_platform_interface ^6.18.0
  - firebase_auth_web ^5.8.0
  - firebase_core ^2.15.1
  - firebase_core_platform_interface ^4.8.0
  - flutter any
  - meta ^1.8.0
- cloud_firestore 4.9.1
  - cloud_firestore_platform_interface ^5.16.0
  - cloud_firestore_web ^3.7.0
  - collection ^1.0.0
  - firebase_core ^2.15.1
  - firebase_core_platform_interface ^4.8.0
  - flutter any
  - meta ^1.8.0
- firebase_ui_firestore 1.5.11
  - cloud_firestore ^4.9.1
  - firebase_ui_localizations ^1.6.1
  - flutter any
- firebase_storage 11.2.6
  - firebase_core ^2.15.1
  - firebase_core_platform_interface ^4.8.0
  - firebase_storage_platform_interface ^4.4.5
  - firebase_storage_web ^3.6.6
  - flutter any
- firebase_messaging 14.6.7
  - firebase_core ^2.15.1
  - firebase_core_platform_interface ^4.8.0
  - firebase_messaging_platform_interface ^4.5.6
  - firebase_messaging_web ^3.5.6
  - flutter any
  - meta ^1.8.0
- cloud_functions 4.4.0
  - cloud_functions_platform_interface ^5.5.0
  - cloud_functions_web ^4.6.0
  - firebase_core ^2.15.1
  - firebase_core_platform_interface ^4.8.0
  - flutter any
- intl 0.18.1
  - clock ^1.1.0
  - meta ^1.0.2
  - path ^1.8.0
- get 4.6.6
  - flutter any
- get_storage 2.1.1
  - flutter any
  - get >=4.0.0 <6.0.0
  - path_provider ^2.0.1
- image_picker 0.8.9
  - flutter any
  - image_picker_android ^0.8.4+11
  - image_picker_for_web ^2.1.0
  - image_picker_ios ^0.8.6+1
  - image_picker_linux ^0.2.0
  - image_picker_macos ^0.2.0
  - image_picker_platform_interface ^2.8.0
  - image_picker_windows ^0.2.0
- image_cropper 3.0.3
  - flutter any
  - image_cropper_platform_interface ^3.0.3
  - image_cropper_for_web ^1.0.3
- dio 5.3.2
  - async ^2.8.2
  - http_parser ^4.0.0
  - meta ^1.5.0
  - path ^1.8.0
- path_provider 2.1.1
  - flutter any
  - path_provider_android ^2.1.0
  - path_provider_foundation ^2.3.0
  - path_provider_linux ^2.2.0
  - path_provider_platform_interface ^2.1.0
  - path_provider_windows ^2.2.0
- google_mobile_ads 2.4.0
  - meta ^1.0.4
  - flutter any
  - visibility_detector ^0.3.3
- pdfx 2.3.0
  - flutter any
  - flutter_web_plugins any
  - plugin_platform_interface ^2.1.2
  - js ^0.6.4
  - device_info_plus ^4.0.0
  - uuid ^3.0.6
  - meta ^1.7.0
  - extension ^0.5.0
  - synchronized ^3.0.0+2
  - universal_platform ^1.0.0+1
  - photo_view ^0.14.0
  - vector_math ^2.1.2
- shimmer 2.0.0
  - flutter any
- lottie 2.6.0
  - archive ^3.0.0
  - flutter any
  - path ^1.8.0
  - vector_math ^2.1.0
- flutter_rating_bar 4.0.1
  - flutter any
- cached_network_image 3.2.3
  - flutter any
  - flutter_cache_manager ^3.3.0
  - octo_image ^1.0.0
  - cached_network_image_platform_interface ^2.0.0
  - cached_network_image_web ^1.0.2
- fluttertoast 8.2.2
  - flutter any
  - flutter_web_plugins any
- file_picker 3.0.4
  - flutter any
  - flutter_web_plugins any
  - flutter_plugin_android_lifecycle ^2.0.0
  - plugin_platform_interface ^2.0.0
- open_filex 4.3.2
  - flutter any
  - ffi ^2.0.1
- internet_connection_checker 1.0.0+1
- permission_handler 10.4.3
  - flutter any
  - meta ^1.7.0
  - permission_handler_android ^10.3.0
  - permission_handler_apple ^9.1.1
  - permission_handler_windows ^0.1.3
  - permission_handler_platform_interface ^3.11.0
- back_button_interceptor 7.0.0
  - collection ^1.17.1
  - flutter any

dev dependencies:
- flutter_test 0.0.0
  - flutter any
  - test_api 0.6.0
  - matcher 0.12.16
  - path 1.8.3
  - fake_async 1.3.1
  - clock 1.1.1
  - stack_trace 1.11.0
  - vector_math 2.1.4
  - async 2.11.0
  - boolean_selector 2.1.1
  - characters 1.3.0
  - collection 1.17.2
  - material_color_utilities 0.5.0
  - meta 1.9.1
  - source_span 1.10.0
  - stream_channel 2.1.1
  - string_scanner 1.2.0
  - term_glyph 1.2.1
  - web 0.1.4-beta
- flutter_lints 2.0.3
  - lints ^2.0.0

transitive dependencies:
- _flutterfire_internals 1.3.5
  - collection ^1.0.0
  - firebase_core ^2.15.1
  - firebase_core_platform_interface ^4.8.0
  - flutter any
  - meta ^1.8.0
- archive 3.3.8
  - crypto ^3.0.0
  - path ^1.8.0
  - pointycastle ^3.6.2
- async 2.11.0
  - collection ^1.15.0
  - meta ^1.1.7
- boolean_selector 2.1.1
  - source_span ^1.8.0
  - string_scanner ^1.1.0
- cached_network_image_platform_interface 2.0.0
  - flutter any
  - flutter_cache_manager ^3.0.0
- cached_network_image_web 1.0.2
  - flutter any
  - flutter_cache_manager ^3.0.0
  - cached_network_image_platform_interface ^2.0.0
- characters 1.3.0
- clock 1.1.1
- cloud_firestore_platform_interface 5.16.0
  - _flutterfire_internals ^1.3.5
  - collection ^1.15.0
  - firebase_core ^2.15.1
  - flutter any
  - meta ^1.8.0
  - plugin_platform_interface ^2.1.3
- cloud_firestore_web 3.7.0
  - _flutterfire_internals ^1.3.5
  - cloud_firestore_platform_interface ^5.16.0
  - collection ^1.0.0
  - firebase_core ^2.15.1
  - firebase_core_web ^2.7.0
  - flutter any
  - flutter_web_plugins any
  - js ^0.6.3
- cloud_functions_platform_interface 5.5.0
  - firebase_core ^2.15.1
  - flutter any
  - meta ^1.8.0
  - plugin_platform_interface ^2.1.3
- cloud_functions_web 4.6.0
  - cloud_functions_platform_interface ^5.5.0
  - firebase_core ^2.15.1
  - firebase_core_web ^2.7.0
  - flutter any
  - flutter_web_plugins any
  - js ^0.6.3
- collection 1.17.2
- convert 3.1.1
  - typed_data ^1.3.0
- cross_file 0.3.3+5
  - js ^0.6.3
  - meta ^1.3.0
- crypto 3.0.3
  - typed_data ^1.3.0
- device_info_plus 4.1.3
  - flutter any
  - device_info_plus_platform_interface ^3.0.0
  - device_info_plus_macos ^3.0.0
  - device_info_plus_linux ^3.0.0
  - device_info_plus_web ^3.0.0
  - device_info_plus_windows ^4.0.0
- device_info_plus_linux 3.0.0
  - device_info_plus_platform_interface ^3.0.0
  - file ^6.0.0
  - flutter any
  - meta ^1.3.0
- device_info_plus_macos 3.0.0
  - device_info_plus_platform_interface ^3.0.0
  - flutter any
- device_info_plus_platform_interface 3.0.0
  - flutter any
  - meta ^1.3.0
  - plugin_platform_interface ^2.0.0
- device_info_plus_web 3.0.0
  - device_info_plus_platform_interface ^3.0.0
  - flutter_web_plugins any
  - flutter any
- device_info_plus_windows 4.1.0
  - device_info_plus_platform_interface ^3.0.0
  - ffi ^2.0.1
  - flutter any
  - win32 >=2.7.0 <4.0.0
- extension 0.5.0
- fake_async 1.3.1
  - clock ^1.1.0
  - collection ^1.15.0
- ffi 2.1.0
- file 6.1.4
  - meta ^1.3.0
  - path ^1.8.0
- file_selector_linux 0.9.2+1
  - cross_file ^0.3.1
  - file_selector_platform_interface ^2.6.0
  - flutter any
- file_selector_macos 0.9.3+2
  - cross_file ^0.3.1
  - file_selector_platform_interface ^2.6.0
  - flutter any
- file_selector_platform_interface 2.6.1
  - cross_file ^0.3.0
  - flutter any
  - http >=0.13.0 <2.0.0
  - plugin_platform_interface ^2.1.0
- file_selector_windows 0.9.3+1
  - cross_file ^0.3.1
  - file_selector_platform_interface ^2.6.0
  - flutter any
- firebase_auth_platform_interface 6.18.0
  - _flutterfire_internals ^1.3.5
  - collection ^1.16.0
  - firebase_core ^2.15.1
  - flutter any
  - meta ^1.8.0
  - plugin_platform_interface ^2.1.3
- firebase_auth_web 5.8.0
  - firebase_auth_platform_interface ^6.18.0
  - firebase_core ^2.15.1
  - firebase_core_web ^2.7.0
  - flutter any
  - flutter_web_plugins any
  - http_parser ^4.0.0
  - js ^0.6.3
  - meta ^1.8.0
- firebase_core_platform_interface 4.8.0
  - collection ^1.0.0
  - flutter any
  - flutter_test any
  - meta ^1.8.0
  - plugin_platform_interface ^2.1.3
- firebase_core_web 2.7.0
  - firebase_core_platform_interface ^4.8.0
  - flutter any
  - flutter_web_plugins any
  - js ^0.6.3
  - meta ^1.8.0
- firebase_messaging_platform_interface 4.5.6
  - _flutterfire_internals ^1.3.5
  - firebase_core ^2.15.1
  - flutter any
  - meta ^1.8.0
  - plugin_platform_interface ^2.1.3
- firebase_messaging_web 3.5.6
  - _flutterfire_internals ^1.3.5
  - firebase_core ^2.15.1
  - firebase_core_web ^2.7.0
  - firebase_messaging_platform_interface ^4.5.6
  - flutter any
  - flutter_web_plugins any
  - js ^0.6.3
  - meta ^1.8.0
- firebase_storage_platform_interface 4.4.5
  - collection ^1.15.0
  - firebase_core ^2.15.1
  - flutter any
  - meta ^1.8.0
  - plugin_platform_interface ^2.1.3
- firebase_storage_web 3.6.6
  - _flutterfire_internals ^1.3.5
  - async ^2.5.0
  - firebase_core ^2.15.1
  - firebase_core_web ^2.7.0
  - firebase_storage_platform_interface ^4.4.5
  - flutter any
  - flutter_web_plugins any
  - http >=0.13.0 <2.0.0
  - js ^0.6.3
  - meta ^1.8.0
- firebase_ui_localizations 1.6.1
  - flutter any
  - flutter_localizations any
  - path ^1.8.2
- flutter_blurhash 0.7.0
  - flutter any
- flutter_cache_manager 3.3.1
  - clock ^1.1.0
  - collection ^1.15.0
  - file >=6.1.4 <8.0.0
  - flutter any
  - http >=0.13.0 <2.0.0
  - path ^1.8.0
  - path_provider ^2.0.0
  - rxdart >=0.26.0 <0.28.0
  - sqflite ^2.0.0+4
  - uuid >=3.0.0 <5.0.0
- flutter_plugin_android_lifecycle 2.0.16
  - flutter any
- flutter_web_plugins 0.0.0
  - flutter any
  - characters 1.3.0
  - collection 1.17.2
  - material_color_utilities 0.5.0
  - meta 1.9.1
  - vector_math 2.1.4
  - web 0.1.4-beta
- http 0.13.6
  - async ^2.5.0
  - http_parser ^4.0.0
  - meta ^1.3.0
- http_parser 4.0.2
  - collection ^1.15.0
  - source_span ^1.8.0
  - string_scanner ^1.1.0
  - typed_data ^1.3.0
- image_cropper_for_web 1.0.3
  - flutter any
  - flutter_web_plugins any
  - image_cropper_platform_interface ^3.0.3
  - js ^0.6.3
- image_cropper_platform_interface 3.0.3
  - flutter any
  - plugin_platform_interface ^2.1.0
  - http ^0.13.4
- image_picker_android 0.8.7+5
  - flutter any
  - flutter_plugin_android_lifecycle ^2.0.1
  - image_picker_platform_interface ^2.8.0
- image_picker_for_web 2.2.0
  - flutter any
  - flutter_web_plugins any
  - image_picker_platform_interface ^2.8.0
  - mime ^1.0.4
- image_picker_ios 0.8.8+2
  - flutter any
  - image_picker_platform_interface ^2.8.0
- image_picker_linux 0.2.1+1
  - file_selector_linux ^0.9.1+3
  - file_selector_platform_interface ^2.2.0
  - flutter any
  - image_picker_platform_interface ^2.8.0
- image_picker_macos 0.2.1+1
  - file_selector_macos ^0.9.1+1
  - file_selector_platform_interface ^2.3.0
  - flutter any
  - image_picker_platform_interface ^2.8.0
- image_picker_platform_interface 2.9.1
  - cross_file ^0.3.1+1
  - flutter any
  - http >=0.13.0 <2.0.0
  - plugin_platform_interface ^2.1.0
- image_picker_windows 0.2.1+1
  - file_selector_platform_interface ^2.2.0
  - file_selector_windows ^0.9.0
  - flutter any
  - image_picker_platform_interface ^2.8.0
- js 0.6.7
  - meta ^1.7.0
- lints 2.1.1
- matcher 0.12.16
  - async ^2.10.0
  - meta ^1.8.0
  - stack_trace ^1.10.0
  - term_glyph ^1.2.0
  - test_api >=0.5.0 <0.7.0
- material_color_utilities 0.5.0
  - collection ^1.15.0
- meta 1.9.1
- mime 1.0.4
- octo_image 1.0.2
  - flutter any
  - flutter_blurhash >=0.6.0 <0.8.0
- path 1.8.3
- path_provider_android 2.2.0
  - flutter any
  - path_provider_platform_interface ^2.1.0
- path_provider_foundation 2.3.1
  - flutter any
  - path_provider_platform_interface ^2.1.0
- path_provider_linux 2.2.1
  - ffi >=1.1.2 <3.0.0
  - flutter any
  - path ^1.8.0
  - path_provider_platform_interface ^2.1.0
  - xdg_directories >=0.2.0 <2.0.0
- path_provider_platform_interface 2.1.1
  - flutter any
  - platform ^3.0.0
  - plugin_platform_interface ^2.1.0
- path_provider_windows 2.2.1
  - ffi ^2.0.0
  - flutter any
  - path ^1.8.0
  - path_provider_platform_interface ^2.1.0
  - win32 >=2.1.0 <6.0.0
- permission_handler_android 10.3.4
  - flutter any
  - permission_handler_platform_interface ^3.11.2
- permission_handler_apple 9.1.4
  - flutter any
  - permission_handler_platform_interface ^3.11.2
- permission_handler_platform_interface 3.11.3
  - flutter any
  - meta ^1.3.0
  - plugin_platform_interface ^2.0.0
- permission_handler_windows 0.1.3
  - flutter any
  - permission_handler_platform_interface ^3.11.0
- photo_view 0.14.0
  - flutter any
- platform 3.1.2
- plugin_platform_interface 2.1.6
  - meta ^1.3.0
- pointycastle 3.7.3
  - collection ^1.15.0
  - convert ^3.0.0
  - js ^0.6.3
- rxdart 0.27.7
- share_plus_platform_interface 3.3.0
  - cross_file ^0.3.3+4
  - flutter any
  - meta ^1.8.0
  - mime ^1.0.4
  - plugin_platform_interface ^2.1.4
  - path_provider ^2.0.14
  - uuid ^3.0.7
- sky_engine 0.0.99
- source_span 1.10.0
  - collection ^1.15.0
  - path ^1.8.0
  - term_glyph ^1.2.0
- sqflite 2.3.0
  - flutter any
  - sqflite_common >=2.5.0-1 <4.0.0
  - path >=1.8.0 <3.0.0
- sqflite_common 2.5.0
  - synchronized >=3.0.0 <5.0.0
  - path >=1.8.0 <3.0.0
  - meta >=1.3.0 <3.0.0
- stack_trace 1.11.0
  - path ^1.8.0
- stream_channel 2.1.1
  - async ^2.5.0
- string_scanner 1.2.0
  - source_span ^1.8.0
- synchronized 3.1.0
- term_glyph 1.2.1
- test_api 0.6.0
  - async ^2.5.0
  - boolean_selector ^2.1.0
  - collection ^1.15.0
  - meta ^1.3.0
  - source_span ^1.8.0
  - stack_trace ^1.10.0
  - stream_channel ^2.1.0
  - string_scanner ^1.1.0
  - term_glyph ^1.2.0
- typed_data 1.3.2
  - collection ^1.15.0
- universal_platform 1.0.0+1
- url_launcher_android 6.0.39
  - flutter any
  - url_launcher_platform_interface ^2.0.3
- url_launcher_ios 6.1.5
  - flutter any
  - url_launcher_platform_interface ^2.0.3
- url_launcher_linux 3.0.6
  - flutter any
  - url_launcher_platform_interface ^2.0.3
- url_launcher_macos 3.0.7
  - flutter any
  - url_launcher_platform_interface ^2.0.3
- url_launcher_platform_interface 2.1.4
  - flutter any
  - plugin_platform_interface ^2.1.0
- url_launcher_web 2.0.20
  - flutter any
  - flutter_web_plugins any
  - url_launcher_platform_interface ^2.0.3
- url_launcher_windows 3.0.8
  - flutter any
  - url_launcher_platform_interface ^2.0.3
- uuid 3.0.7
  - crypto ^3.0.0
- vector_math 2.1.4
- visibility_detector 0.3.3
  - flutter any
- web 0.1.4-beta
- win32 3.1.4
  - ffi >=1.1.2 <3.0.0
- xdg_directories 1.0.3
  - meta ^1.3.0
  - path ^1.8.0

Steps to reproduce

@override
  Widget build(BuildContext context) {
    return FirestoreListView<PostModel>(
      shrinkWrap: true,
      pageSize: 10,
      query: userPostsQuery,
      itemBuilder: (context, snapshot) {
        PostModel post = snapshot.data();
        debugPrint('post text: ${post.text}');
        return _PostWidget(key: ValueKey(post.postId), post: post);
      },
      loadingBuilder: (context) => const LoadingCircle(),
      emptyBuilder: (context) => const _NoPostWidget(),
    );
  }

my query: 
Query<PostModel> userPostQuery(String userId) {
    return _firestore
        .collection('posts')
        .where('userId', isEqualTo: userId)
        .orderBy('createdAt', descending: true)
        .withConverter(
            fromFirestore: (snapshot, options) =>
                PostModel.fromMap(snapshot.data()!),
            toFirestore: (value, options) => value.toMap());
  }

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

My DEBUG CONSOLE output:
Restarted application in 662ms.
[GETX] Instance "BookController" has been created
[GETX] Instance "BookController" has been initialized
[GETX] Instance "GetMaterialController" has been created
[GETX] Instance "GetMaterialController" has been initialized
[GETX] Instance "Controller" has been created
[GETX] Instance "Controller" has been initialized
[GETX] Instance "UserController" has been created
[GETX] Instance "UserController" has been initialized
[GETX] Instance "HomeController" has been created
[GETX] Instance "HomeController" has been initialized
[GETX] GOING TO ROUTE /UserProfilePage
flutter: post text: The South African comic was due to appear on the 947 radio station in Johannesburg for a morning chat.
flutter:
flutter: But bad traffic, a confused taxi driver and angry locals left the former Daily Show host late for his interview.
flutter:
flutter: "There's a bicycle fighting with a taxi driver," he yelled frantically down a crackly phone line to the show's hosts.
flutter:
flutter: "That's not in your traffic report," the flustered star added, before announcing that he was "gonna get in with some guy," eliciting screams of concern from the presenting team.
flutter:
flutter: The 39-year-old, who quit the Daily Show in 2022 after an acclaimed seven-year run at the helm, finally burst into the studio shortly after.
flutter:
flutter: "Can I just say, whoever is in this traffic, I feel you. We are together," he laughed while explaining the ordeal.
flutter:
flutter: "The driver I'm with doesn't know where we're going," he recalled. "So I jump out of the car, said I'm gonna run."
flutter:
flutter: "While I'm running people are in the street - listening to your show - [are] hooting and shouting 'Trevor it's the other way! You're going'
flutter: post text: Chevrolet Cruze red devil
flutter: post text: 1
flutter: post text: 2
flutter: post text: 3
flutter: post text: 4
flutter: post text: 5
flutter: post text: 6
flutter: post text: 7
flutter: post text: 8
flutter: post text: The South African comic was due to appear on the 947 radio station in Johannesburg for a morning chat.
flutter:
flutter: But bad traffic, a confused taxi driver and angry locals left the former Daily Show host late for his interview.
flutter:
flutter: "There's a bicycle fighting with a taxi driver," he yelled frantically down a crackly phone line to the show's hosts.
flutter:
flutter: "That's not in your traffic report," the flustered star added, before announcing that he was "gonna get in with some guy," eliciting screams of concern from the presenting team.
flutter:
flutter: The 39-year-old, who quit the Daily Show in 2022 after an acclaimed seven-year run at the helm, finally burst into the studio shortly after.
flutter:
flutter: "Can I just say, whoever is in this traffic, I feel you. We are together," he laughed while explaining the ordeal.
flutter:
flutter: "The driver I'm with doesn't know where we're going," he recalled. "So I jump out of the car, said I'm gonna run."
flutter:
flutter: "While I'm running people are in the street - listening to your show - [are] hooting and shouting 'Trevor it's the other way! You're going'
flutter: post text: Chevrolet Cruze red devil
flutter: post text: 1
flutter: post text: 2
flutter: post text: 3
flutter: post text: 4
flutter: post text: 5
flutter: post text: 6
flutter: post text: 7
flutter: post text: 8
flutter: post text: 9
flutter: post text: 10
flutter: post text: 11
flutter: post text: 12
flutter: post text: 13
flutter: post text: 14
flutter: post text: 15
flutter: post text: 16
flutter: post text: 17
flutter: post text: 18
flutter: post text: The South African comic was due to appear on the 947 radio station in Johannesburg for a morning chat.
flutter:
flutter: But bad traffic, a confused taxi driver and angry locals left the former Daily Show host late for his interview.
flutter:
flutter: "There's a bicycle fighting with a taxi driver," he yelled frantically down a crackly phone line to the show's hosts.
flutter:
flutter: "That's not in your traffic report," the flustered star added, before announcing that he was "gonna get in with some guy," eliciting screams of concern from the presenting team.
flutter:
flutter: The 39-year-old, who quit the Daily Show in 2022 after an acclaimed seven-year run at the helm, finally burst into the studio shortly after.
flutter:
flutter: "Can I just say, whoever is in this traffic, I feel you. We are together," he laughed while explaining the ordeal.
flutter:
flutter: "The driver I'm with doesn't know where we're going," he recalled. "So I jump out of the car, said I'm gonna run."
flutter:
flutter: "While I'm running people are in the street - listening to your show - [are] hooting and shouting 'Trevor it's the other way! You're going'
flutter: post text: Chevrolet Cruze red devil
flutter: post text: 1
flutter: post text: 2
flutter: post text: 3
flutter: post text: 4
flutter: post text: 5
flutter: post text: 6
flutter: post text: 7
flutter: post text: 8
flutter: post text: 9
flutter: post text: 10
flutter: post text: 11
flutter: post text: 12
flutter: post text: 13
flutter: post text: 14
flutter: post text: 15
flutter: post text: 16
flutter: post text: 17
flutter: post text: 18
flutter: post text: 19
flutter: post text: 20
flutter: post text: 21
flutter: post text: 22
flutter: post text: 23
flutter: post text: 24
flutter: post text: Kfjdnsmdkd dndjdkdkd dkdkskdnd
flutter: post text: Əldə etmək üçün gərək hər iki ölkənin dövlət bayraqlarının salam de alım
flutter: post text: Kbjcjbkvivjv, k u v kbihkckbi
flutter: post text: Vjcjvlcjcj
flutter: post text: The South African comic was due to appear on the 947 radio station in Johannesburg for a morning chat.
flutter:
flutter: But bad traffic, a confused taxi driver and angry locals left the former Daily Show host late for his interview.
flutter:
flutter: "There's a bicycle fighting with a taxi driver," he yelled frantically down a crackly phone line to the show's hosts.
flutter:
flutter: "That's not in your traffic report," the flustered star added, before announcing that he was "gonna get in with some guy," eliciting screams of concern from the presenting team.
flutter:
flutter: The 39-year-old, who quit the Daily Show in 2022 after an acclaimed seven-year run at the helm, finally burst into the studio shortly after.
flutter:
flutter: "Can I just say, whoever is in this traffic, I feel you. We are together," he laughed while explaining the ordeal.
flutter:
flutter: "The driver I'm with doesn't know where we're going," he recalled. "So I jump out of the car, said I'm gonna run."
flutter:
flutter: "While I'm running people are in the street - listening to your show - [are] hooting and shouting 'Trevor it's the other way! You're going'
flutter: post text: Chevrolet Cruze red devil
flutter: post text: 1
flutter: post text: 2
flutter: post text: 3
flutter: post text: 4
flutter: post text: 5
flutter: post text: 6
flutter: post text: 7
flutter: post text: 8
flutter: post text: 9
flutter: post text: 10
flutter: post text: 11
flutter: post text: 12
flutter: post text: 13
flutter: post text: 14
flutter: post text: 15
flutter: post text: 16
flutter: post text: 17
flutter: post text: 18
flutter: post text: 19
flutter: post text: 20
flutter: post text: 21
flutter: post text: 22
flutter: post text: 23
flutter: post text: 24
flutter: post text: Kfjdnsmdkd dndjdkdkd dkdkskdnd
flutter: post text: Əldə etmək üçün gərək hər iki ölkənin dövlət bayraqlarının salam de alım
flutter: post text: Kbjcjbkvivjv, k u v kbihkckbi
flutter: post text: Vjcjvlcjcj
flutter: post text: Cnnxjsnsndnd dndndnndndnddnd
flutter: post text: Ndkdkdkd
flutter: post text: Jfndndj dnndmsmmsdmsmdm dmdkkddkl salam necəsən neynirsən və bu barədə məlumat verib ki sən necəsən neynirsən ürəyim də var ki mikrob salam
flutter: post text: Ndkalla
flutter: post text: hmm
flutter: post text: Test 555
flutter: post text: Test post
flutter: post text: Hərkəsə salam. Mənə Riyaziyyat fakültəsi üzrə 2ci kurs üçün matrikslər mühazirələri lazımdır. Kimdə varsa mənimlə əlaqə saxlasın zəhmət olmasa 🙏
danagbemava-nc commented 10 months ago

I also see that more items are loaded than the page size that is set using the plugin example app.

a-s-k-u commented 9 months ago

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.

image

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.

User-0-{"city":"Savannahburgh","country":"Paraguay","streetName":"Hahn Burgs","zipCode":"03785","prefix":"Ms.","firstName":"Lamont","lastName":"Wisoky","email":"crooks-kyleigh@hoppe.name","userName":"wolf.kylee","number":"087.720.6713"}) User-1-{"city":"Wymanfurt","country":"Syrian Arab Republic","streetName":"Homenick Manor","zipCode":"11550","prefix":"Ms.","firstName":"Helena","lastName":"Dare","email":"noemi_kihn@mclaughlin.us","userName":"d'amore_lurline","number":"001-400-520-1247x525"}) User-2-{"city":"East New Hattieville","country":"Rwanda","streetName":"Jayson Courts","zipCode":"17637-3735","prefix":"Ms.","firstName":"Roxane","lastName":"Langosh","email":"eduardo_dare@simonis.co.uk","userName":"kilback-beverly","number":"4455840232"}) User-3-{"city":"North Port Lola","country":"South Africa","streetName":"Darrion Passage","zipCode":"24143-6446","prefix":"Miss","firstName":"Madilyn","lastName":"Watsica","email":"goyette-evert@koch.com","userName":"pollich.yazmin","number":"+1-021-340-5477x0272"}) User-4-{"city":"North New Mylene","country":"Sri Lanka","streetName":"Spencer Ville","zipCode":"51684","prefix":"Mrs.","firstName":"Sylvan","lastName":"Denesik","email":"clay-keebler@tromp.us","userName":"amanda_stark","number":"(317)583-8062x85263"}) User-5-{"city":"South Port Doug","country":"Samoa","streetName":"Wyman Bypass","zipCode":"16577-5654","prefix":"Ms.","firstName":"Elenor","lastName":"Bernhard","email":"candida.mccullough@stanton.us","userName":"lynch_sylvia","number":"(066)333-8135x64720"}) User-6-{"city":"North New Sophieborough","country":"Iraq","streetName":"Balistreri Passage","zipCode":"58031","prefix":"Mr.","firstName":"Bernhard","lastName":"Jakubowski","email":"smitham.walton@kshlerin.biz","userName":"kaylin.bauch","number":"350-722-2471"}) User-7-{"city":"Davistown","country":"Turkey","streetName":"Williamson Walks","zipCode":"80702","prefix":"Ms.","firstName":"Aliya","lastName":"Bernhard","email":"ardith-rohan@tremblay.com","userName":"laurie.collier","number":"730-512-8375"}) User-8-{"city":"West Port Etha","country":"Panama","streetName":"Bayer Harbor","zipCode":"51403","prefix":"Dr","firstName":"Luigi","lastName":"Stehr","email":"karson.o'hara@zulauf.biz","userName":"paula-oga","number":"7555510725"}) User-9-{"city":"O'Reillyton","country":"Bouvet Island","streetName":"Lorenz Track","zipCode":"23521-1056","prefix":"Dr","firstName":"Willard","lastName":"Haley","email":"prosacco.lisandro@emmerich.name","userName":"koss-barbara","number":"001-662-774-1455x832"}) User-10-{"city":"Reesefort","country":"Paraguay","streetName":"Derek Cliff","zipCode":"64227","prefix":"Mr.","firstName":"Mariano","lastName":"Feil","email":"frederik-eichmann@heidenreich.name","userName":"schuster_else","number":"+1-880-744-6236x510"}) user : Lamont Wisoky user : Helena Dare user : Roxane Langosh user : Madilyn Watsica user : Sylvan Denesik user : Elenor Bernhard user : Bernhard Jakubowski user : Aliya Bernhard user : Luigi Stehr user : Willard Haley user : Bernhard Jakubowski user : Aliya Bernhard user : Luigi Stehr user : Willard Haley User-0-{"city":"Savannahburgh","country":"Paraguay","streetName":"Hahn Burgs","zipCode":"03785","prefix":"Ms.","firstName":"Lamont","lastName":"Wisoky","email":"crooks-kyleigh@hoppe.name","userName":"wolf.kylee","number":"087.720.6713"}) User-1-{"city":"Wymanfurt","country":"Syrian Arab Republic","streetName":"Homenick Manor","zipCode":"11550","prefix":"Ms.","firstName":"Helena","lastName":"Dare","email":"noemi_kihn@mclaughlin.us","userName":"d'amore_lurline","number":"001-400-520-1247x525"}) User-2-{"city":"East New Hattieville","country":"Rwanda","streetName":"Jayson Courts","zipCode":"17637-3735","prefix":"Ms.","firstName":"Roxane","lastName":"Langosh","email":"eduardo_dare@simonis.co.uk","userName":"kilback-beverly","number":"4455840232"}) User-3-{"city":"North Port Lola","country":"South Africa","streetName":"Darrion Passage","zipCode":"24143-6446","prefix":"Miss","firstName":"Madilyn","lastName":"Watsica","email":"goyette-evert@koch.com","userName":"pollich.yazmin","number":"+1-021-340-5477x0272"}) User-4-{"city":"North New Mylene","country":"Sri Lanka","streetName":"Spencer Ville","zipCode":"51684","prefix":"Mrs.","firstName":"Sylvan","lastName":"Denesik","email":"clay-keebler@tromp.us","userName":"amanda_stark","number":"(317)583-8062x85263"}) User-5-{"city":"South Port Doug","country":"Samoa","streetName":"Wyman Bypass","zipCode":"16577-5654","prefix":"Ms.","firstName":"Elenor","lastName":"Bernhard","email":"candida.mccullough@stanton.us","userName":"lynch_sylvia","number":"(066)333-8135x64720"}) User-6-{"city":"North New Sophieborough","country":"Iraq","streetName":"Balistreri Passage","zipCode":"58031","prefix":"Mr.","firstName":"Bernhard","lastName":"Jakubowski","email":"smitham.walton@kshlerin.biz","userName":"kaylin.bauch","number":"350-722-2471"}) User-7-{"city":"Davistown","country":"Turkey","streetName":"Williamson Walks","zipCode":"80702","prefix":"Ms.","firstName":"Aliya","lastName":"Bernhard","email":"ardith-rohan@tremblay.com","userName":"laurie.collier","number":"730-512-8375"}) User-8-{"city":"West Port Etha","country":"Panama","streetName":"Bayer Harbor","zipCode":"51403","prefix":"Dr","firstName":"Luigi","lastName":"Stehr","email":"karson.o'hara@zulauf.biz","userName":"paula-oga","number":"7555510725"}) User-9-{"city":"O'Reillyton","country":"Bouvet Island","streetName":"Lorenz Track","zipCode":"23521-1056","prefix":"Dr","firstName":"Willard","lastName":"Haley","email":"prosacco.lisandro@emmerich.name","userName":"koss-barbara","number":"001-662-774-1455x832"}) User-10-{"city":"Reesefort","country":"Paraguay","streetName":"Derek Cliff","zipCode":"64227","prefix":"Mr.","firstName":"Mariano","lastName":"Feil","email":"frederik-eichmann@heidenreich.name","userName":"schuster_else","number":"+1-880-744-6236x510"}) User-11-{"city":"Johannashire","country":"Hungary","streetName":"Murazik Wells","zipCode":"82538","prefix":"Ms.","firstName":"Emory","lastName":"Heaney","email":"ezra.ondricka@dietrich.ca","userName":"brennon_hartmann","number":"435.818.0181x525"}) User-12-{"city":"Boyleberg","country":"Timor-leste","streetName":"Carol Rue","zipCode":"00336","prefix":"Ms.","firstName":"Americo","lastName":"Walsh","email":"flatley.samanta@kris.us","userName":"elza_yost","number":"548.252.1476"}) User-13-{"city":"South New Krystal","country":"Monaco","streetName":"Reggie Trafficway","zipCode":"73287","prefix":"Mr.","firstName":"Doug","lastName":"Reilly","email":"nova.hilpert@hermiston.us","userName":"homenick_cordell","number":"705.061.4553x867"}) User-14-{"city":"North New Lilyfurt","country":"Equatorial Guinea","streetName":"Bernhard Mill","zipCode":"11050-2323","prefix":"Mr.","firstName":"Walker","lastName":"O'Kon","email":"harvey_alva@watsica.com","userName":"mann.cleveland","number":"(601)134-3114x114"}) User-15-{"city":"Araberg","country":"Moldova, Republic of","streetName":"Laverne Mall","zipCode":"58832","prefix":"Mrs.","firstName":"Fernando","lastName":"Kuvalis","email":"jacobi-jackie@heidenreich.name","userName":"boyle.darlene","number":"254.515.2818"}) User-16-{"city":"North Lake Chaya","country":"Nicaragua","streetName":"Daniel Fort","zipCode":"46114","prefix":"Dr","firstName":"Danyka","lastName":"Littel","email":"gleason_derek@ledner.info","userName":"aletha.will","number":"+1-305-861-6247x42708"}) User-17-{"city":"West New Violaland","country":"Virgin Islands, U.S.","streetName":"Hamill Lake","zipCode":"70176","prefix":"Miss","firstName":"Omari","lastName":"Rowe","email":"della_huels@yundt.us","userName":"euna.marks","number":"726-744-3401"}) User-18-{"city":"Hilllmouth","country":"Haiti","streetName":"Bergstrom Crossing","zipCode":"72362","prefix":"Dr","firstName":"Jena","lastName":"Boehm","email":"brandyn.kautzer@hilpert.co.uk","userName":"hagenes-cassandra","number":"517.806.2410"}) User-19-{"city":"Lockmanville","country":"Indonesia","streetName":"Rodriguez Row","zipCode":"65163","prefix":"Miss","firstName":"Marvin","lastName":"Jenkins","email":"rita_emard@macejkovic.us","userName":"robb.howell","number":"+1-872-365-0752x7230"}) User-20-{"city":"Swaniawskimouth","country":"Afghanistan","streetName":"Erick Pike","zipCode":"20461","prefix":"Mrs.","firstName":"Hazel","lastName":"Purdy","email":"anderson-filiberto@spinka.info","userName":"rey.effertz","number":"544-546-6736"}) user : Bernhard Jakubowski user : Aliya Bernhard user : Luigi Stehr user : Willard Haley user : Mariano Feil

rorystephenson commented 9 months ago

As an aside, it would be great if the pagination state/logic was completely encapsulated in _QueryBuilderSnapshot and it was exposed as a class that could be used independently, e.g. FirestorePaginator. It could provide methods for interacting with it (fetch page) and expose a stream pages. That would allow: