durationStr function Null safety

String durationStr(
  1. int ms
)

Implementation

String durationStr(int ms) {
  final s = DateUtil.formatDateMs(
    ms,
    format: 'mm:ss',
  );
  final h = (ms / 3600000).floor();
  if (h >= 1) {
    return "$h:$s";
  }
  return s;
}