toHourTime method

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

Implementation

Time? toHourTime({bool withSec = true}) {
  try {
    if (isNotNullOrEmpty) {
      return Time.fromStr(toNotNull);
    } else {
      return Time.fromSeconds(0);
    }
  } catch (_) {
    return Time.fromSeconds(0);
  }
}