chore: Follow up use 24 hour format

This commit is contained in:
Krille 2024-07-04 15:37:28 +02:00
commit e88afdd357
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
3 changed files with 9 additions and 1 deletions

View file

@ -35,7 +35,7 @@ extension DateTimeExtension on DateTime {
/// Returns a simple time String.
String localizedTimeOfDay(BuildContext context) =>
MediaQuery.of(context).alwaysUse24HourFormat
L10n.of(context)!.alwaysUse24HourFormat == 'true'
? DateFormat('HH:mm', L10n.of(context)!.localeName).format(this)
: DateFormat('h:mm a', L10n.of(context)!.localeName).format(this);