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
623 stars 210 forks source link

default newPageErrorIndicatorBuilder and retryLastFailedRequest don't retry #226

Closed mkatzour closed 6 months ago

mkatzour commented 1 year ago

First off: Thank you for the excellent package!

When I force a failure on one of my next page requests, both the default newPageErrorIndicatorBuilder widget, as well as a custom one calling retryLastFailedRequest don't trigger a retry. Looking at the code, I see it clears the error, but doesn't notify listeners... could that be why?

My workaround is to use a custom widget like this: newPageErrorIndicatorBuilder: (context) => generateRetryButton("Something went wrong. Tap to retry", () { _pagingController.retryLastFailedRequest(); _fetchFeedPage(_pagingController.nextPageKey!); }, key: const Key("feedNewPageError"))

Thanks!

frankmungnodev commented 1 year ago

I have the same problem too

abubakarmvp commented 1 year ago

i am also facing the same problem

EdsonBueno commented 1 year ago

You should probably delete that _fetchFeedPage(_pagingController.nextPageKey!) line. Can you try again and tell me the result?

eastsss commented 9 months ago

Same problem, retryLastFailedRequest() call doesn't do anything at all. Page request listener is not notified.