previousPage method

dynamic previousPage (
  1. {Duration duration,
  2. Curve curve: Curves.bounceInOut}
)

scroll to previous month / week

it will do animate while duration is not null

Implementation

previousPage({
  Duration duration,
  Curve curve = Curves.bounceInOut
}) {
  if (duration != null) {
    _pageController.previousPage(
      duration: duration,
      curve: curve
    );
  } else {
    _pageController.jumpToPage((_pageController.page - 1).toInt());
  }
}