toPage method

Future<void> toPage(
  1. int page, {
  2. Duration duration = const Duration(milliseconds: 300),
  3. Curve curve = Curves.ease,
})

Animates the parent PageView from the current page to the given page.

Implementation

Future<void> toPage(
  int page, {
  Duration duration = const Duration(milliseconds: 300),
  Curve curve = Curves.ease,
}) async =>
    pageController.animateToPage(page, duration: duration, curve: curve);