onSwipe property

CardSwiperOnSwipe? onSwipe
final

Callback function that is called when a swipe action is performed.

The function is called with the oldIndex, the currentIndex and the direction of the swipe. If the function returns false, the swipe action is canceled and the current card remains on top of the stack. If the function returns true, the swipe action is performed as expected.

Implementation

final CardSwiperOnSwipe? onSwipe;