Time.fromDateTime constructor

Time.fromDateTime(
  1. DateTime dateTime
)

Creates a new Time object from a DateTime object.

Implementation

factory Time.fromDateTime(DateTime dateTime) {
  return Time(dateTime.hour, dateTime.minute);
}