updateFifthIndex method Null safety

void updateFifthIndex(
  1. int index
)

Implementation

void updateFifthIndex(int index) {
  this.fifthIndex = index;

  int minMinute = _minMinuteOfCurrentHour();
  var newTime = currentTime.isUtc
      ? DateTime.utc(
          currentTime.year,
          currentTime.month,
          currentTime.day,
          currentTime.hour,
          minMinute + index,
          currentTime.second,
        )
      : DateTime(
          currentTime.year,
          currentTime.month,
          currentTime.day,
          currentTime.hour,
          minMinute + index,
          currentTime.second,
        );
  _checkTime(newTime);

  int minSecond = _minSecondOfCurrentMinute();
  sixtyIndex = currentTime.second - minSecond;
}