onComplete method

  1. @override
CompleteData onComplete()
override

Implementation

@override
CompleteData onComplete() {
  DateTime time = currentTime.add(Duration(days: _currentIndex[0]!));
  var hour = _currentIndex[1]!;
  var minute = _currentIndex[2]!;
  if (isAtSameDay(minTime, time)) {
    hour += minTime!.hour;
    if (minTime!.hour == hour) {
      minute += minTime!.minute;
    }
  }

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