Skip to content

Commit

Permalink
fix: am pm bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
user5522 committed Jun 3, 2024
1 parent 74fd8da commit 7c9ca74
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,14 @@ class TimeConfig extends ConsumerWidget {
: time.hour > 12
? time.hour - 12
: time.hour;
final amORpm = uses24HoursFormat
? null
: time.hour > 12
? "PM"
: "AM";
final amORpm = time.hour > 12 ? "PM" : "AM";
final formattedTimeMinute = time.minute == 0
? "00"
: time.minute < 10
? "0${time.minute}"
: "${time.minute}";

return "$formattedTimeHour:$formattedTimeMinute $amORpm";
return "$formattedTimeHour:$formattedTimeMinute${uses24HoursFormat ? "" : " $amORpm"}";
}

return Row(
Expand Down

0 comments on commit 7c9ca74

Please sign in to comment.