formatHour method Null safety
Formats TimeOfDay.hour in the given time of day according to the value of timeOfDayFormat.
If alwaysUse24HourFormat
is true, formats hour using HourFormat.HH
rather than the default for the current locale.
Implementation
String formatHour(TimeOfDay timeOfDay, { bool alwaysUse24HourFormat = false });