8000 可能是手势引起的一个loadmore跳屏问题,是否有方法规避? · Issue #523 · peng8350/flutter_pulltorefresh · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

可能是手势引起的一个loadmore跳屏问题,是否有方法规避? #523

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
ldhlfzysys opened this issue Aug 23, 2021 · 6 comments

Comments

@ldhlfzysys
Copy link

loadmore时,拉高一点,手不离开屏幕,当前cell会跳动到新数据的最后一条,并且再触发一次loadmore。

1629718073426486.mp4
@ldhlfzysys
Copy link
Author

用的提交问题时master分支版本。

@ldhlfzysys
Copy link
Author

#19 看着和这个相似,但是看评论说解决了,我这仍然能复现

@ldhlfzysys
Copy link
Author

#430 跳转问题看这个issue是官方问题,不知道有没有给官方提这个issue

8000

@ldhlfzysys
Copy link
Author

flutter/flutter#89417 官方已经复现并接受了

@ldhlfzysys
Copy link
Author

解决方案:


class MyScrollPhysics extends BouncingScrollPhysics {
  const MyScrollPhysics({ScrollPhysics parent}) : super(parent: parent);
  @override
  MyScrollPhysics applyTo(ScrollPhysics ancestor) {
    return MyScrollPhysics(parent: buildParent(ancestor));
  }

  @override
  double adjustPositionForNewDimensions({
    ScrollMetrics oldPosition,
    ScrollMetrics newPosition,
    bool isScrolling,
    double velocity,
  }) {
    return newPosition.pixels;
  }
}

SmartRefresher(
physics: MyScrollPhysics()
)


@figbin
Copy link
figbin commented Sep 25, 2021

人才啊,有一个 issue 是我提的,一直没解决,最近再关注下(其实早期flutter版本是没问题的)
楼主去官方提得这么详细,这个功能官方确实需要改进,太影响体验了,不知道接受了没有。
感谢楼主提出解决方案。

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

2 participants
0