combine static method

DateTime combine(
  1. DateTime date,
  2. TimeOfDay? time
)

Sets the hour and minute of a DateTime from a TimeOfDay.

Implementation

static DateTime combine(DateTime date, TimeOfDay? time) => DateTime(
    date.year, date.month, date.day, time?.hour ?? 0, time?.minute ?? 0);