minutesToHmHourValue method

String minutesToHmHourValue()

Implementation

String minutesToHmHourValue() {
  int totalMinutes = toInt();
  int hours = totalMinutes ~/ 60; // 计算小时数
  int minutes = totalMinutes % 60; // 计算剩余的分钟数
  if (hours < 1) {
    return '$hours'.padLeft(2, '0');
  }
  return '$hours'.padLeft(2, '0');
}