toYearMonth method
Change another YearMonth
within YearMonthRange
in
CupertinoCalendarMonthView. Otherwise, throws RangeError or call
onError
if provided
Implementation
void toYearMonth(YearMonth yearMonth,
{void Function(RangeError re)? onError}) {
try {
_stateKey.currentState!._toAnotherYearMonth(yearMonth);
} on RangeError catch (re) {
(onError ?? (re) => throw re)(re);
}
}