getDurationFromMinutess static method

String getDurationFromMinutess(
  1. int minutes
)

持续时间(m)

Implementation

static String getDurationFromMinutess(int minutes) {
  final duration = Duration(minutes: minutes);
  String twoDigits(int n) => n.toString().padLeft(2, "0");
  String twoDigitHours = twoDigits(duration.inMinutes.remainder(60));
  String twoDigitMinutes = twoDigits(duration.inSeconds.remainder(60));
  return "${twoDigits(duration.inHours)}:$twoDigitHours:$twoDigitMinutes";
}