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

当tab前面的内容超过一屏,或者说超过一屏更多,下面的内容在没有吸顶的情况下,listview跟着滑动 #74

Closed
cqkyis opened this issue Jun 6, 2021 · 7 comments

Comments

@cqkyis
Copy link

cqkyis commented Jun 6, 2021

测试大佬的demo,也会出现类同的情况,希望大佬能指点一下,。情况台下,
body: extended.NestedScrollView( headerSliverBuilder: (context, f) { return [ ExtendedSliverAppbar( title: IndexTitle(), leading: Container(), isOpacityFadeWithTitle: false, isOpacityFadeWithToolbar: false, background: IndexBackgroud(), ), SliverPersistentHeader( delegate: BaseSliverPersistentHeader( child: buidTabBar(), maxHeight: 50, minHeight: 50, ), pinned: true, ), ]; }, pinnedHeaderSliverHeightBuilder: () { return pinnedHeaderHeight; }, body: TabBarView( controller: homeController.tabController, children: homeController.pageList, ), ), );

@zmtzawqlp
Copy link
Member

官方的会吗

@cqkyis
Copy link
Author

cqkyis commented Jun 7, 2021

已解决,官方的也有这个问题

@zmtzawqlp
Copy link
Member

你可以试着pr ,我看看

@cqkyis
Copy link
Author

cqkyis commented Jun 7, 2021

old那个dart的1032行,if(innerDate <=-1 && innerDart >=1 )解决的,不知道有没有问题

@zmtzawqlp
Copy link
Member

zmtzawqlp commented Jun 8, 2021

有点取巧 而且为啥不写成 innerDate.abs() >=1. 其实之前我也写过,但是不是大于1.0,大于的一个常量,后来merge 官方代码,merge掉了

@zmtzawqlp
Copy link
Member

///this is a bug that the out postion is not overscroll actually and it get minimal value
///do under code will scroll inner positions
///so i igore minimal value here(value like following data)
/// I/flutter (14963): 5.684341886080802e-14
/// I/flutter (14963): -5.684341886080802e-14
/// I/flutter (14963): -5.684341886080802e-14
/// I/flutter (14963): 5.684341886080802e-14
/// I/flutter (14963): -5.684341886080802e-14
/// I/flutter (14963): -5.684341886080802e-14
/// I/flutter (14963): -5.684341886080802e-14
if (innerDelta != 0.0 && innerDelta.abs() > 0.0001) {
for (_NestedScrollPosition position in _currentInnerPositions) {
position.applyFullDragUpdate(innerDelta);
}
}

zmtzawqlp added a commit that referenced this issue Jul 15, 2021
* Check scrollable state if mounted on finding key of ScrollPosition. #78
* Igore inner position when inner delta is minimal value. #74
zmtzawqlp added a commit that referenced this issue Jul 15, 2021
…78

* Igore inner position when inner delta is minimal value. #74
@zmtzawqlp
Copy link
Member

最新版本已经增加了判断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

2 participants