Closed afl-lxw closed 5 months ago
Which great god can answer my doubts or tell me what to do. Thank you.
Hi @afl-lxw.
Maybe you could update your fetchRefresh
function to:
Future<void> fetchRefresh() async {
pagingController.value = PagingState();
pagingController.refresh();
}
Let me know if it works.
it doesn't work, I am currently facing the same issues, the content is duplicating on refresh
Let's call refresh()
to reset item to null first (that will execute firstPageProgressIndicatorBuilder
to show ProgressIndicatorWidget) and then set new data:
Future<void> fetchRefresh() async {
pagingController.refresh();
pagingController.value = PagingState(
nextPageKey: FIRST_PAGE_KEY,
error: null,
itemList: NEW_LIST_ITEM,
);
}
我是使用的 getx 管理 infinite_scroll_pagination 的状态
Now I want to execute the fetchRefresh function in getx and perform the refresh when pulling down the refresh My expectation is to clear the content and reload from the first page after execution But in reality, the data hasn't changed, just a refresh