formatTimestamp static method

String formatTimestamp(
  1. int? timestamp, {
  2. String? format,
})

Implementation

static String formatTimestamp(int? timestamp, {String? format}) {
  if (timestamp == null) {
    return '';
  }
  var date = DateTime.fromMillisecondsSinceEpoch(timestamp);
  return Formatter.formatDate(date, format: format);
}