INNER CODE UNIT · Dart

minutes

jhomlala/feather · lib/src/utils/date_time_helper.dart:30

    final int minutes = ((time - hours * hoursAsMs) / minutesAsMs).floor();
    final int seconds =
    ((time - hours * hoursAsMs - minutes * minutesAsMs) / secondsAsMs)
        .floor();
    String text = "";
    if (hours > 0) {
      text += "${formatTimeUnit(hours)}h ";
    }
    if (minutes > 0) {
      text += "${formatTimeUnit(minutes)}m ";
    }
    if (seconds >= 0) {
      text += "${formatTimeUnit(seconds)}s";
    }
    return text;
  }
  
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…