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

Fix issue #289 (unable to scroll to the bottom of the body's Widget when used with a Scaffold) #303

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

qixotic
Copy link

@qixotic qixotic commented May 9, 2022

This should fix #289 by modifying the builder to respect the parent's width/height constraints.

Also tweaks a few files so that one can build the example on iOS.

Looks like this issue has affected many versions, with a few PRs attempting to fix it or otherwise related: #44 #64 #92 #129. 64&92 take the same core approach of passing in constraints via a LayoutBuilder.

qixotic added 2 commits May 9, 2022 20:58
Wraps the panel's widget in a LayoutBuilder so that body can use the
parent's max constraints for height and width. This allows the panel to
play nicely with an AppBar if present, regardless of
Scaffold.extendBodyBehindAppBar's value.
@ayqy
Copy link

ayqy commented Sep 26, 2022

Great fix, cloud you pub your version directly, as it takes so long time from #44 (2019), this repo seems dead..

@qixotic
Copy link
Author

qixotic commented Oct 4, 2022

Great fix, cloud you pub your version directly, as it takes so long time from #44 (2019), this repo seems dead..

Added a tag to my repo so you could also just reference this fix in your pubspec.yaml if you don't need any other proposed PRs by others:

  sliding_up_panel:
    git:
      url: https://github.com/qixotic/sliding_up_panel
      ref: v2.0.0+1-Pull303

@leonardo2204
Copy link

leonardo2204 commented Mar 13, 2023

@qixotic Hey, I know it's been a long time since you've created this PR, but shouldn't it also take into account the minHeight? Otherwise, when collapsed, my body is still partially hidden.

What I did (in this part):

child: Container(
           height: constraints.maxHeight - widget.minHeight,
           width: constraints.maxWidth,
           child: widget.body,
),

Does this make sense?

Thanks

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

Successfully merging this pull request may close these issues.

Body not scrolling to bottom
3 participants