updateSecondIndex method

  1. @override
void updateSecondIndex(
  1. int index
)
override

更新第二列index

Implementation

@override
void updateSecondIndex(int index) {
  super.updateSecondIndex(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,
        )
      : DateTime(
          currentTime.year,
          destMonth,
          currentTime.day <= dayCount ? currentTime.day : dayCount,
        );
  //min/max check
  _checkTime(newTime);

  _fillDayList();
  int minDay = _minDayOfCurrentMonth();
  thirdIndex = currentTime.day - minDay;
}