akshathjain / sliding_up_panel

A draggable Flutter widget that makes implementing a SlidingUpPanel much easier!
https://pub.dartlang.org/packages/sliding_up_panel
Other
1.38k stars 378 forks source link

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

Open qixotic opened 2 years ago

qixotic commented 2 years ago

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.

ayqy commented 2 years ago

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

qixotic commented 2 years ago

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 commented 1 year ago

@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