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
This commit is contained in:
ricardodalarme 2023-03-23 23:18:54 -03:00
parent 33915ff416
commit 2a93440b85
1 changed files with 0 additions and 8 deletions

View File

@ -81,14 +81,6 @@ class _ExamplePageState extends State<Example> {
int? currentIndex, int? currentIndex,
CardSwiperDirection direction, 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( debugPrint(
'the card $previousIndex was swiped to the ${direction.name}. Now the card $currentIndex is on top', 'the card $previousIndex was swiped to the ${direction.name}. Now the card $currentIndex is on top',
); );