getDateAmPm function
Implementation
String getDateAmPm([int? time]) {
time ??= getCurrentTimeMillis();
_initializeDateFormatting();
var date = DateTime.fromMillisecondsSinceEpoch(time);
var dateFormat = DateFormat('jm');
var s = dateFormat.format(date);
return s.contains('PM') ? 'PM' : 'AM';
}