first commit

This commit is contained in:
2025-03-03 20:59:42 +03:00
commit 273e68557a
1099 changed files with 17880 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
///
/// Расширение для работы с [Duration]
///
extension AppDuration on Duration {
///
/// Получение длительности в формате mm:ss
///
String get mmss => hhmmss.substring('00:'.length);
///
/// Получение длительности в формате HH:mm:ss
///
String get hhmmss {
String twoDigits(int n) => n.toString().padLeft(2, '0');
String twoDigitMinutes = twoDigits(inMinutes.remainder(60));
String twoDigitSeconds = twoDigits(inSeconds.remainder(60));
return '${twoDigits(inHours)}:$twoDigitMinutes:$twoDigitSeconds';
}
}