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

Fix issue tapping panel cause panel do wrong move (panelBuilder) #275

Open AmosPeng opened 2 years ago

AmosPeng commented 2 years ago

Avoid wrong move action on a tap gesture when panelBuilder is not null.

Scenario The possible scenario is opening the panel to a custom position with PanelController, then just tap the panel body. The panel will do the animation to open/close/snap position due to the _onGestureEnd will be called all the time on each onPointerUp event.

Solution Use constant kPanSlop to determine the dy to be confident the panning gesture.