withTime method

DateTime? withTime(
  1. TimeOfDay? timeOfDay
)

Implementation

DateTime? withTime(TimeOfDay? timeOfDay) {
  if (this == null || timeOfDay == null) {
    return this;
  }

  return this?.copyWith(
    hour: timeOfDay.hour,
    minute: timeOfDay.minute,
  );
}