Skip to content
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

1.12.13+hotfix.7 无法下拉刷新 #250

Closed
moxc opened this issue Feb 12, 2020 · 4 comments
Closed

1.12.13+hotfix.7 无法下拉刷新 #250

moxc opened this issue Feb 12, 2020 · 4 comments

Comments

@moxc
Copy link

moxc commented Feb 12, 2020

firstRefreshWidget 与 emptyWidget 不为null时出现

@yjouyang
Copy link

Same Problem

@yjouyang
Copy link

求fix

@galaxybruce
Copy link

galaxybruce commented Mar 6, 2020

_taskNotifier.addListener(() {
// 监听首次刷新是否结束
if (_enableFirstRefresh && !_taskNotifier.value.refreshing) {
_scrollerController.jumpTo(0.0);
setState(() {
_enableFirstRefresh = false;
});
}
});

这里个监听没执行,_enableFirstRefresh永远是true。

需要这样改:
set refreshTask(Future task) {
_refreshTask = task;
if (!widget.taskIndependence)
// 这里改变的不是ValueNotifier.value,所以没法执行回到
// widget.taskNotifier.value.refreshing = task != null;
// 这样才行,具体原因查看ValueNotifier源码
widget.taskNotifier.value = TaskState(refreshing: task != null, loading: widget.taskNotifier.value.loading);

}

@xuelongqy
Copy link
Owner

2.1.0已修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants