fluttercandies / extended_nested_scroll_view

extended nested scroll view to fix following issues. 1.pinned sliver header issue 2.inner scrollables in tabview sync issue 3.pull to refresh is not work. 4.do without ScrollController in NestedScrollView's body
MIT License
597 stars 120 forks source link

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

Closed cqkyis closed 3 years ago

cqkyis commented 3 years ago

测试大佬的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 commented 3 years ago

官方的会吗

cqkyis commented 3 years ago

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

zmtzawqlp commented 3 years ago

你可以试着pr ,我看看

cqkyis commented 3 years ago

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

zmtzawqlp commented 3 years ago

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

zmtzawqlp commented 3 years ago

///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 commented 3 years ago

最新版本已经增加了判断0的优化