chore: Follow up time of day format
This commit is contained in:
parent
873362428c
commit
fc867b33a1
1 changed files with 3 additions and 1 deletions
|
|
@ -35,7 +35,9 @@ extension DateTimeExtension on DateTime {
|
|||
|
||||
/// Returns a simple time String.
|
||||
String localizedTimeOfDay(BuildContext context) =>
|
||||
DateFormat.Hm(L10n.of(context)!.localeName).format(this);
|
||||
MediaQuery.of(context).alwaysUse24HourFormat
|
||||
? DateFormat('HH:mm', L10n.of(context)!.localeName).format(this)
|
||||
: DateFormat('h:mm a', L10n.of(context)!.localeName).format(this);
|
||||
|
||||
/// Returns [localizedTimeOfDay()] if the ChatTime is today, the name of the week
|
||||
/// day if the ChatTime is this week and a date string else.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue