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
591 stars 117 forks source link

当header的高度已经超过屏幕高度了,body还使用SliverFillRemain的话,会导致屏幕越界报错 #127

Open navyzhou926 opened 1 year ago

navyzhou926 commented 1 year ago

Content

需要增加一个参数:bodyIsFillRemaining来决定是否使用_ExtendedSliverFillRemainingWithScrollable

List _buildSlivers(BuildContext context, ScrollController innerController, bool bodyIsScrolled) { return [ ...headerSliverBuilder(context, bodyIsScrolled), bodyIsFillRemaining ? _ExtendedSliverFillRemainingWithScrollable( child: PrimaryScrollController( automaticallyInheritForPlatforms: TargetPlatform.values.toSet(), controller: innerController, child: body, ), ) : SliverToBoxAdapter( child: PrimaryScrollController( automaticallyInheritForPlatforms: TargetPlatform.values.toSet(), controller: innerController, child: body, ), ), ]; }

zmtzawqlp commented 1 year ago

无所谓的。release 没影响。因为可以滚动,也不会真正溢出