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.36k stars 377 forks source link

Better Support On Landscape Orientation #310

Open kttary opened 2 years ago

kttary commented 2 years ago

Is it possible to auto shrink the width of the the widget when using landscape orientation? And even more add resize handler to collapse the widget when we are using medium or larger screen? I attached some image for better description:

Landscape orientation on small secreen, the width of widget shrink to the left without resize handler at the bottom. There is enough space to interact with maps: landscape_small_screen

On medium or large screen, the widget shrink to the lefft with resize handler at the bottom so we can resize in if we need more space to interact with the map: landscape_medium_or_big_screen

The widget is collapsible on medium or large screen: Landscape_collapsed

Currently it consume almost all screen on desktop application: image

qixotic commented 1 year ago

Can't you already change the width of the sliding panel effectively by playing with the margin: parameter? I've got a demo in https://github.com/akshathjain/sliding_up_panel/pull/303/commits/4a7b51a670eb8385e54db0dbb0d243c067e59313 (although the general idea should work regardless of the original PR fix). And to collapse up, conditionally set slideDirection: SlideDirection.DOWN