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 381 forks source link

Close panel on backdrop drag #108

Closed craggy2593 closed 4 years ago

craggy2593 commented 4 years ago

Is there any way of closing the panel on dragging the backdrop in the direction of the panel close?

There is the ability to close on tap with backdropTapClosesPanel, and dragging within the panel when using a panelBuilder will close accordingly, but when dragging within the backdrop area, any interactions are ignored.

akshathjain commented 4 years ago

You can create a custom GestureDetector over your body and check for drags that way. On a drag, you can use the PanelController and call _pc.close().

akshathjain commented 4 years ago

Related to #24, #70, #121. This has been implemented and will be pushed in v1.0.1.