mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-21 23:10:40 +00:00
fixed hours parsing
This commit is contained in:
parent
90a4b9a056
commit
c8617ec00b
1 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue