previousPage method Null safety

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

Animates the controlled PreloadPageView to the previous 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> previousPage(
    {required Duration duration, required Curve curve}) {
  return animateToPage(page!.round() - 1, duration: duration, curve: curve);
}