nextPage method

Future<void> nextPage(
  1. {required Duration duration,
  2. required Curve curve}

Animates the controlled PageView to the next page.

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


Future<void> nextPage({ required Duration duration, required Curve curve }) {
  return animateToPage(page!.round() + 1, duration: duration, curve: curve);