getDisplayTime static method
Get display time.
Implementation
static String getDisplayTime(
int value, {
bool hours = true,
bool minute = true,
bool second = true,
bool milliSecond = true,
String hoursRightBreak = ':',
String minuteRightBreak = ':',
String secondRightBreak = '.',
}) {
final hoursStr = getDisplayTimeHours(value);
final mStr = getDisplayTimeMinute(value, hours: hours);
final sStr = getDisplayTimeSecond(value);
final msStr = getDisplayTimeMillisecond(value);
var result = '';
if (hours) {
result += hoursStr;
}
if (minute) {
if (hours) {
result += hoursRightBreak;
}
result += mStr;
}
if (second) {
if (minute) {
result += minuteRightBreak;
}
result += sStr;
}
if (milliSecond) {
if (second) {
result += secondRightBreak;
}
result += msStr;
}
return result;
}