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

`isPanelClosed` and `isPanelOpen` always returning false #269

Open desimmons opened 3 years ago

desimmons commented 3 years ago

Describe the bug isPanelClosed and isPanelOpen always returning false because panelPosition is returning none integer values close to (but not exactly equal to) 0 or 1: panelPosition: 9.313225537987968e-12 panelPosition: 0.9999999999906868

g-jindal2001 commented 2 years ago

Any updates on this issue?

HafizAlwi commented 2 years ago

still no update, I got this bug too on my dev apps

bastiaand commented 2 years ago

This is my workaround for now. Hope you find it useful.

void togglePanel() { panelController.panelPosition.round() == 1 ? panelController.close() : panelController.open(); }

Mohit8G commented 1 year ago

This is my workaround for now. Hope you find it useful.

void togglePanel() { panelController.panelPosition.round() == 1 ? panelController.close() : panelController.open(); }

worked for me thanks