Open navyzhou926 opened 1 year ago
需要增加一个参数: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, ), ), ]; }
无所谓的。release 没影响。因为可以滚动,也不会真正溢出
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,
),
),
];
}