correctFormatTime function Null safety

String correctFormatTime(
  1. int? m
)

Implementation

String correctFormatTime(int? m) {
  if (m == null) {
    return "";
  }
  String minute = m.toString();
  if (minute.length < 2) {
    minute = "0$minute";
  }
  return minute;
}