timeOfDayToString function

String timeOfDayToString(
  1. TimeOfDay time
)

Converts a TimeOfDay object to a formatted string representation

Implementation

String timeOfDayToString(TimeOfDay time) {
  var minute = time.minute;
  if (minute < 10) return '${time.hour}: 0${time.minute}';

  return '${time.hour}: ${time.minute}';
}