setTime method
Sets the time of the current DateTime to the specified TimeOfDay.
Returns a new DateTime with the same date but the given time.
Audited: 2026-06-12 11:26 EDT
Implementation
@useResult
// ignore: saropa_lints/avoid_datetime_constructor -- date fields come from this valid DateTime (implicit this); hour/minute are the caller's TimeOfDay clock time
DateTime setTime({required TimeOfDay time}) => DateTime(year, month, day, time.hour, time.minute);