8000 嵌套的ListView会误触发刷新操作 · Issue #10 · peng8350/flutter_pulltorefresh · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

嵌套的ListView会误触发刷新操作 #10

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
Shu-Ji opened this issue Sep 11, 2018 · 1 comment
Closed

嵌套的ListView会误触发刷新操作 #10

Shu-Ji opened this issue Sep 11, 2018 · 1 comment

Comments

@Shu-Ji
Copy link
Shu-Ji commented Sep 11, 2018

外层为垂直ListView,内层中有水平的ListView。
现在的情况是在左右滑动内层的 listview 的时候,也会导致触发下拉刷新,怎么禁用呢,没有看到控制的地方。

SmartRefresher(
    child: ListView.builder(
        itemBuilder: PageView.builder(...)  // 左右滑动这里的PageView,会触发刷新操作
    )
)
@Shu-Ji Shu-Ji changed the title 支持嵌套的ListView 嵌套的ListView会误触发刷新操作 Sep 11, 2018
@Shu-Ji
Copy link
Author
Shu-Ji commented Sep 11, 2018

解决了,禁止内层的滚动事件冒泡:

SmartRefresher(
    child: ListView.builder(
        itemBuilder: NotificationListener(
            onNotification: (n) => true,
            child: PageView.builder(...)
        )
    )
)

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

1 participant
0