Time.fromDateTime constructor

Time.fromDateTime(
  1. DateTime time, {
  2. bool? keepLocal,
})

Implementation

factory Time.fromDateTime(DateTime time, {bool? keepLocal}) => Time(
      hour: time.hour,
      minute: time.minute,
      seconds: time.second,
      local: keepLocal ?? !time.isUtc,
    );