appinioGmbH / flutter_packages

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

[BUG]: Unable to Cancel Up Swipe with Down Swipe Disabled #309

Open ThomasHaas15 opened 1 week ago

ThomasHaas15 commented 1 week ago

Plugin name Appinio Swiper

Describe the bug When the SwipeOptions.only(down: false) option is used, the ability to cancel an upward swipe is impaired. If a user swipes up but then tries to reverse the action (drag the card back down), the card continues moving upward instead of following the intended cancel gesture. This ultimately results in the card being swiped up completely, even if the user attempted to stop or reverse the swipe. The issue appears to be related to the down: false setting, which prevents downward motion.

To Reproduce Steps to reproduce the behavior:

  1. Set SwipeOptions.only(down: false).
  2. Swipe up on a card.
  3. Try to reverse the swipe by dragging the card back down.
swipeOptions: const SwipeOptions.only(
     up: true,
     down: false,
     left: true,
     right: true,
),

Expected behavior When swiping up, users should be able to cancel or reverse the swipe by dragging the card back down, regardless of the down: false setting.

Screenshots

https://github.com/user-attachments/assets/8a6a7ccd-bd3d-4e1f-86a7-f87116eeb31a

Smartphone: