appinioGmbH / flutter_packages

Dart and Flutter plugins/packages used and maintained by @appinioGmbH
187 stars 214 forks source link

[appinio_swiper] onSwiping should follow drop action #155

Closed Nico04 closed 10 months ago

Nico04 commented 1 year ago

I'd like to use onSwiping & onSwipeCancelled callbacks to animate page background to indicate to user the relevant action it will be done when he will drop the card (lift his finger). Currently, thoses callbacks doesn't reflect what action will be done when swipe gesture is over. For instance, if you start swiping on one side, but go back to the center to "cancel" the gesture, and lift your finger, it will cancel swipe action. But in that case, the onSwiping is only called when going to the other side, and onSwipeCancelled is only called when you drop the card. So there is currently no way to indicate to the user the action is going to do, in real time.

One idea would be to pass null to onSwiping when moving to a position where droping card would do nothing.

bilalhamud commented 10 months ago

Fixed with version 2.1.0