tryFormatDurationToStr static method

String? tryFormatDurationToStr(
  1. Duration? duration, {
  2. MyFormatDurationType_e type = MyFormatDurationType_e.hhMMSS,
  3. MySeparatorType_e separator = MySeparatorType_e.Symbol,
})

Implementation

static String? tryFormatDurationToStr(
  Duration? duration, {
  MyFormatDurationType_e type = MyFormatDurationType_e.hhMMSS,
  MySeparatorType_e separator = MySeparatorType_e.Symbol,
}) {
  if (null == duration) {
    return null;
  }
  return formatDurationToStr(
    duration,
    type: type,
    separator: separator,
  );
}