getTimeFromDate static method

String getTimeFromDate(
  1. DateTime? date, {
  2. String timeFormat = "hh:mm a'",
})

Implementation

static String getTimeFromDate(DateTime? date,
    {String timeFormat = "hh:mm a'"}) {
  try {
    return DateFormat(timeFormat).format(date!).toUpperCase();
  } catch (e) {
    return '';
  }
}