getTime method

String getTime({
  1. bool is24Hours = false,
})

19:02 or 7:02 pm depending on is24Hours

Implementation

String getTime({bool is24Hours = false}) {
  return TimeOfDay.fromDateTime(this).getTime(is24Hours: is24Hours);
}