moveToPreviousYear method

void moveToPreviousYear(
  1. {bool needAnimation = false,
  2. Duration duration = const Duration(milliseconds: 500),
  3. Curve curve = Curves.ease}
)

Implementation

void moveToPreviousYear(
    {bool needAnimation = false,
    Duration duration = const Duration(milliseconds: 500),
    Curve curve = Curves.ease}) {
  DateTime targetDateTime = monthList[calendarProvider
              .calendarConfiguration.monthController.page
              .toInt() -
          12]
      .getDateTime();
  moveToCalendar(
      targetDateTime.year, targetDateTime.month, targetDateTime.day,
      needAnimation: needAnimation, duration: duration, curve: curve);
}