Closed cqkyis closed 3 years ago
官方的会吗
已解决,官方的也有这个问题
你可以试着pr ,我看看
old那个dart的1032行,if(innerDate <=-1 && innerDart >=1 )解决的,不知道有没有问题
有点取巧 而且为啥不写成 innerDate.abs() >=1. 其实之前我也写过,但是不是大于1.0,大于的一个常量,后来merge 官方代码,merge掉了
///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); } }
最新版本已经增加了判断0的优化
测试大佬的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, ), ), );