tryFormatDurationToStr static method

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

Implementation

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