From 7c9ca745ac478e32237b0df7ace438051e70abbb Mon Sep 17 00:00:00 2001 From: Username * Date: Mon, 3 Jun 2024 22:04:11 +0100 Subject: [PATCH] fix: am pm bug fix --- .../subject_management/subject_configs/time_config.dart | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/components/subject_management/subject_configs/time_config.dart b/lib/components/subject_management/subject_configs/time_config.dart index a866b19..c67a783 100644 --- a/lib/components/subject_management/subject_configs/time_config.dart +++ b/lib/components/subject_management/subject_configs/time_config.dart @@ -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(