getDurationTimeString static method

String getDurationTimeString(
  1. Duration duration
)

Implementation

static String getDurationTimeString(Duration duration) {
  String line = "";
  if (duration.inHours != 0) {
    line = twoDigits(duration.inHours.remainder(24)) + ":";
  }
  line = line + twoDigits(duration.inMinutes.remainder(60)) + ":";
  line = line + twoDigits(duration.inSeconds.remainder(60));
  return line;
}