animateToPage method

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

Animate to page number page.

Arguments duration and curve will override default values provided as MonthView.pageTransitionDuration and MonthView.pageTransitionCurve respectively.

Implementation

Future<void> animateToPage(int page,
    {Duration? duration, Curve? curve}) async {
  await _pageController.animateToPage(page,
      duration: duration ?? widget.pageTransitionDuration,
      curve: curve ?? widget.pageTransitionCurve);
}