EdsonBueno / infinite_scroll_pagination

Flutter package to help you lazily load and display pages of items as the user scrolls down your screen.
https://pub.dev/packages/infinite_scroll_pagination
MIT License
626 stars 213 forks source link

v4.0.0 Crashed in iOS #285

Closed jackwill99 closed 1 year ago

jackwill99 commented 1 year ago

This is my code

debugPrint("Logger is => ${newItems.length} and $nextPageKey");
widget.controller.appendPage(newItems, nextPageKey);
debugPrint("Logger value => ${widget.controller.value}");

and this is my logs

Logger is => 10 and 20
[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
#0      PagingController.notifyStatusListeners (package:infinite_scroll_pagination/src/core/paging_controller.dart:170)
#1      PagingController.value= (package:infinite_scroll_pagination/src/core/paging_controller.dart:94)
#2      _HomeBusinessListInfiniteState.fetchBusinessInfinitePage (package:wowme/home/views/home_business.dart:121)
Logger value => PagingState(itemList: ┤null├, error: null, nextPageKey: 10)

I added 10 items and 20 nextPageKey but the output log is null and page key is 10.