updateThirdIndex method Null safety

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

更新第三列index

Implementation

@override
void updateThirdIndex(int index) {
  this.thirdIndex = index;

  int minDay = _minDayOfCurrentMonth();
  var newTime = currentTime.isUtc
      ? DateTime.utc(
          currentTime.year,
          currentTime.month,
          minDay + index,
          currentTime.hour,
          currentTime.minute,
          currentTime.second,
        )
      : DateTime(
          currentTime.year,
          currentTime.month,
          minDay + index,
          currentTime.hour,
          currentTime.minute,
          currentTime.second,
        );
  //min/max check
  _checkTime(newTime);

  int minHour = _minHourOfCurrentDay();
  int minMinute = _minMinuteOfCurrentHour();
  int minSecond = _minSecondOfCurrentMinute();

  fourthIndex = currentTime.hour - minHour;
  fifthIndex = currentTime.minute - minMinute;
  sixtyIndex = currentTime.second - minSecond;
}