previousMonth method
dynamic
previousMonth()
Implementation
previousMonth() {
int year = scrollYearInt;
int month = scrollMonthInt;
if (month == 1) {
year -= 1;
month = 12;
} else {
month -= 1;
}
if (year < minDateTime.year ||
(year == minDateTime.year && month < minDateTime.month)) return;
controller
.animateTo(offsetForDateTime(DateTime(year, month)),
duration: const Duration(milliseconds: 5), curve: Curves.linear)
.then((value) => notify());
}