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

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

Open
navyzhou926 opened this issue Mar 15, 2023 · 1 comment
Assignees

Comments

@navyzhou926
Copy link

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
Copy link
Member

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

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