appinioGmbH / flutter_packages

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

[ BUG ] : Appinio Swiper onSwipeEnd method behavior's #191

Closed OsFoouad closed 5 months ago

OsFoouad commented 9 months ago

Plugin name : Appinio Swiper

onSwipeEnd: method , if i started to swipe card then release it without move it to any direction (mean the card release and still in front ) the onSwipeEnd method called and this cause some unexpected things , like the values is updated . with the version 2.0.3 everything was fine. any misunderstand from me ?

khanmujeeb687 commented 9 months ago

Hey @OsFoouad , This bug will be fixed in the next version. Thanks for reporting.

khanmujeeb687 commented 5 months ago

Hey @OsFoouad, The onSwipeEnd mehtod is getting called but with a different option please check the example app.

  void _swipeEnd(int previousIndex, int targetIndex, SwiperActivity activity) {
    switch (activity) {
      case Swipe():
        log('The card was swiped to the : ${activity.direction}');
        log('previous index: $previousIndex, target index: $targetIndex');
        break;
      case Unswipe():
        log('A ${activity.direction.name} swipe was undone.');
        log('previous index: $previousIndex, target index: $targetIndex');
        break;
      case CancelSwipe():
        log('A swipe was cancelled');
        break;
      case DrivenActivity():
        log('Driven Activity');
        break;
    }
  }