toTime method

Time toTime({
  1. bool withSec = true,
})

Implementation

Time toTime({bool withSec = true}) {
  return Time(
      hour: (this?.toLocal().hour ?? 0),
      minute: (this?.toLocal().minute ?? 0),
      second: (withSec == true)
          ? (this?.toLocal().second ?? 0).toFormat().toZero
          : 00);
}