toDetailsPageFormat method
Implementation
String toDetailsPageFormat() {
String twoDigits(int n) {
if (n >= 10) return "$n";
return "0$n";
}
if (inSeconds < 60) {
return "00:${twoDigits(inSeconds)} sec";
} else if (inMinutes < 60) {
return "${twoDigits(inMinutes)} min";
} else {
return "${twoDigits(inHours)}} hr";
}
}