getMaxHm method Null safety

String getMaxHm()

Implementation

String getMaxHm() {
  int hour = _lunar!.getHour();
  if (hour < 1) {
    return '00:59';
  } else if (hour > 22) {
    return '23:59';
  }
  if (hour % 2 != 0) {
    hour += 1;
  }
  return '${hour < 10 ? '0' : ''}$hour:59';
}