dateToHourMinute static method

String dateToHourMinute(
  1. String? date
)

Implementation

static String dateToHourMinute(String? date) {
  if(date == null) return '';
  DateTime dateTime = DateTime.tryParse(date)!.toLocal();
  //print(date);
  //return DateFormat.Hm().format(dateTime);
  return DateFormat('hh:mm aa', 'en-IN').format(dateTime).toUpperCase();
  //return 'here';
}