getDateFromTimestamp static method

String getDateFromTimestamp(
  1. int timestamp, {
  2. String? dateFormat,
})

Implementation

static String getDateFromTimestamp(int timestamp, {String? dateFormat}) {
  DateTime date = DateTime.fromMillisecondsSinceEpoch(timestamp);
  return DateFormat(dateFormat ?? "dd/MM/yyyy").format(date);
}