next method

void next({
  1. required SwipeDirection swipeDirection,
  2. bool shouldCallCompletionCallback = true,
  3. bool ignoreOnWillMoveNext = false,
  4. Duration? duration,
})

Advance to the next card with specified swipeDirection.

You can reject SwipableStack.onSwipeCompleted invocation by setting shouldCallCompletionCallback to false.

You can ignore checking with SwipableStack#onWillMoveNext by setting ignoreOnWillMoveNext to true.

You can change animation speed by setting duration.

Implementation

void next({
  required SwipeDirection swipeDirection,
  bool shouldCallCompletionCallback = true,
  bool ignoreOnWillMoveNext = false,
  Duration? duration,
}) {
  _swipableStackStateKey.currentState?._next(
    swipeDirection: swipeDirection,
    shouldCallCompletionCallback: shouldCallCompletionCallback,
    ignoreOnWillMoveNext: ignoreOnWillMoveNext,
    duration: duration,
  );
}