animateToPage method

Future<void> animateToPage(
  1. int page, {
  2. required Duration duration,
  3. required Curve curve,
})

Animates the controlled Swiper to the given page

The animation lasts for the given duration and follows the given curve. The returned Future resolves when the animation completes.

The duration and curve arguments must not be null.

Implementation

Future<void> animateToPage(
    int page, {
      required Duration duration,
      required Curve curve,
    }) {
  return _state.animateToPage(
    page < 0 ? 0 : page,
    duration: duration,
    curve: curve,
  );
}