format static method

String format(
  1. int timestamp,
  2. String format
)

Implementation

static String format(int timestamp, String format) {
  final date = DateTime.fromMillisecondsSinceEpoch(timestamp * 1000);
  final dateFormat = DateFormat(format);
  return dateFormat.format(date);
}