Skip to content

和SmartRefresher 一起使用会导致下拉刷新失效, listview改为shrinkWrap: false就可以,但是又会导致无法滑动 #124

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

Closed
lfclfc opened this issue Mar 26, 2025 · 7 comments
Assignees

Comments

@lfclfc
Copy link

lfclfc commented Mar 26, 2025

Version

scrollview_observer: ^1.26.0

Platforms

dart

Device Model

android 13

flutter info

flutter doctor -v i

How to reproduce?

ListView 内容:
ListView.builder(
shrinkWrap: true,
padding: EdgeInsets.fromLTRB(12, 12, 12, 0),
itemCount: currentList.length + 1,
itemBuilder: (context, index) {

SmartRefresher层级:

children: [
SmartRefresher(
enablePullDown: true,
enablePullUp: true,
controller: _refreshController,
onRefresh: _onRefresh,
onLoading: _onLoading,
child: bodyContent(),
),

Logs

Example code (optional)

Contact

No response

@lfclfc lfclfc changed the title 和SmartRefresher 一起使用会导致下拉刷新失效, shrinkWrap: false,但是会导致无法滑动 和SmartRefresher 一起使用会导致下拉刷新失效, listview改为shrinkWrap: false就可以,但是又会导致无法滑动 Mar 26, 2025
@ZhuJHua
Copy link

ZhuJHua commented Mar 26, 2025

试试custom_refresh_indicator

@lfclfc
Copy link
Author

lfclfc commented Mar 26, 2025

试试custom_refresh_indicator

好的 我试试

@lfclfc
Copy link
Author

lfclfc commented Mar 26, 2025

试试custom_refresh_indicator

不行啊, 这个库没有加载更多,只有下拉刷新。

@LinXunFeng
Copy link
Member

LinXunFeng commented Mar 26, 2025

不支持 SmartRefresher,而且它已经很久不更新了,下面那个都可以

相关 issue: #19

如果是 easy_refresh 可以看示例代码:https://github.com/fluttercandies/flutter_scrollview_observer/blob/main/example/lib/features/scene/chat_demo/page/chat_page.dart

@lfclfc
Copy link
Author

lfclfc commented Mar 26, 2025

不支持 SmartRefresher,而且它已经很久不更新了,下面那个都可以

相关 issue: #19

好的 谢谢 我研究下

@ZhuJHua
Copy link

ZhuJHua commented Mar 26, 2025

试试custom_refresh_indicator

不行啊, 这个库没有加载更多,只有下拉刷新。

onRefresh可以在两个方向触发,只要判断是哪个方向触发的就知道是下拉还是上拉了

@floatTop
Copy link

floatTop commented Apr 3, 2025

不支持 SmartRefresher,而且它已经很久不更新了,下面那个都可以

相关 issue: #19

好的 谢谢 我研究下

可以试试 pull_to_refresh_flutter3 把physics和scrollController 传给SmartRefresher就行了

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