updateSecondIndex method
更新第二列index
Implementation
@override
void updateSecondIndex(int index) {
this.secondIndex = index;
int minMonth = _minMonthOfCurrentYear();
int destMonth = minMonth + index;
DateTime newTime;
//change date time
int dayCount = calcDateCount(currentTime.year, destMonth);
newTime = currentTime.isUtc
? DateTime.utc(
currentTime.year,
destMonth,
currentTime.day <= dayCount ? currentTime.day : dayCount,
currentTime.hour,
currentTime.minute,
currentTime.second,
)
: DateTime(
currentTime.year,
destMonth,
currentTime.day <= dayCount ? currentTime.day : dayCount,
currentTime.hour,
currentTime.minute,
currentTime.second,
);
//min/max check
_checkTime(newTime);
_fillDayList();
int minDay = _minDayOfCurrentMonth();
int minHour = _minHourOfCurrentDay();
int minMinute = _minMinuteOfCurrentHour();
int minSecond = _minSecondOfCurrentMinute();
thirdIndex = currentTime.day - minDay;
fourthIndex = currentTime.hour - minHour;
fifthIndex = currentTime.minute - minMinute;
sixtyIndex = currentTime.second - minSecond;
}