finalTime method

  1. @override
DateTime finalTime()
override

Implementation

@override
DateTime finalTime() {
  DateTime time = currentTime.add(Duration(days: _currentLeftIndex));
  var hour = _currentMiddleIndex;
  var minute = _currentRightIndex;
  if (isAtSameDay(minTime, time)) {
    hour += minTime!.hour;
    if (minTime!.hour == hour) {
      minute += minTime!.minute;
    }
  }

  return currentTime.isUtc
      ? DateTime.utc(time.year, time.month, time.day, hour, minute)
      : DateTime(time.year, time.month, time.day, hour, minute);
}