goToPage method

Future<void> goToPage({
  1. required int pageNumber,
  2. double? padding,
  3. Duration duration = const Duration(milliseconds: 500),
})

Go to the specified page.

Implementation

Future<void> goToPage({
  required int pageNumber,
  double? padding,
  Duration duration = const Duration(milliseconds: 500),
}) =>
    goTo(
      destination:
          calculatePageFitMatrix(pageNumber: pageNumber, padding: padding),
      duration: duration,
    );