From c8617ec00bc89e0fce01ca54c1e2132b21eddac4 Mon Sep 17 00:00:00 2001 From: Vadim <44135514+vodemn@users.noreply.github.com> Date: Fri, 3 May 2024 13:12:33 +0200 Subject: [PATCH] fixed hours parsing --- lib/screens/timer/components/text/widget_text_timer.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/screens/timer/components/text/widget_text_timer.dart b/lib/screens/timer/components/text/widget_text_timer.dart index f8fc67a..35765ba 100644 --- a/lib/screens/timer/components/text/widget_text_timer.dart +++ b/lib/screens/timer/components/text/widget_text_timer.dart @@ -19,7 +19,6 @@ class TimerText extends StatelessWidget { parseSeconds(), style: Theme.of(context).textTheme.displayMedium, ), - if (duration.inMinutes < 1) Text( addZeroIfNeeded(timeLeft.inMilliseconds % 1000, 3), style: Theme.of(context).textTheme.displaySmall, @@ -32,7 +31,7 @@ class TimerText extends StatelessWidget { final buffer = StringBuffer(); int remainingMs = timeLeft.inMilliseconds; // longer than 1 hours - if (duration.inSeconds >= Duration.millisecondsPerHour) { + if (duration.inMilliseconds >= Duration.millisecondsPerHour) { final hours = remainingMs ~/ Duration.millisecondsPerHour; buffer.writeAll([addZeroIfNeeded(hours), ':']); remainingMs -= hours * Duration.millisecondsPerHour;