time static method
Formats time as 'HH:mm'
Example:
DateFormatters.time(DateTime(2024, 1, 15, 14, 30)); // '14:30'
Implementation
static String time(DateTime date) {
return '${date.hour.toString().padLeft(2, '0')}:${date.minute.toString().padLeft(2, '0')}';
}