toHoursMinutesFormatString function

String toHoursMinutesFormatString(
  1. String? duration
)

Converts a string representation of a duration in the format "HH:mm" to a formatted string.

  • Parameters:

    • duration: A string representing the duration in "HH:mm" format.
  • Returns: A formatted string in "HH:mm" format, or "00:00" if the input is invalid.

Implementation

String toHoursMinutesFormatString(String? duration) {
  return toHoursMinutesFormat(parseDuration(duration));
}