added function to convert duration into a formatted string
This commit is contained in:
@@ -4,3 +4,7 @@ String getEnumValueName<T extends Enum>(T value) {
|
|||||||
name = name[0].toUpperCase() + name.substring(1);
|
name = name[0].toUpperCase() + name.substring(1);
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String durationToFormattedString(Duration duration) {
|
||||||
|
return '${duration.inHours}h ${duration.inMinutes % 60}m';
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user