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:
parent
33915ff416
commit
2a93440b85
|
|
@ -81,14 +81,6 @@ class _ExamplePageState extends State<Example> {
|
|||
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',
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue