previous method

Future<void> previous({
  1. Duration duration = const Duration(milliseconds: 200),
  2. Curve curve = Curves.ease,
})
inherited

Animates the current page to the previous page. Does nothing if it is the first page.

Implementation

Future<void> previous({Duration duration = const Duration(milliseconds: 200), Curve curve = Curves.ease}) async {
  if (_from(_current) case final page when 0 < page) {
    await _animateTo(page - 1, duration, curve);
  }
}