From 2a93440b8590c7bdb5540e5ee18299453dafa74c Mon Sep 17 00:00:00 2001 From: ricardodalarme Date: Thu, 23 Mar 2023 23:18:54 -0300 Subject: [PATCH] change(example): remove cancel swipe example on OnSwipe callback * It was removed because it can cause users to think that there is a bug in the library, because the swipe is canceled --- example/lib/main.dart | 8 -------- 1 file changed, 8 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 0e6a524..361a97a 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -81,14 +81,6 @@ class _ExamplePageState extends State { int? currentIndex, CardSwiperDirection direction, ) { - if (currentIndex?.isEven == true && direction == CardSwiperDirection.left || - currentIndex?.isOdd == true && direction == CardSwiperDirection.right) { - debugPrint( - 'the card $currentIndex was swiped to the: ${direction.name}; Oh, and also your action got canceled', - ); - return false; - } - debugPrint( 'the card $previousIndex was swiped to the ${direction.name}. Now the card $currentIndex is on top', );