formatDate method

String formatDate()

Implementation

String formatDate() {
  DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(
    int.tryParse(this) ?? 0,
  );
  String formattedDate = DateFormat("d MMM yyyy, h:mm a").format(dateTime);
  return formattedDate;
}