formatMs static method

String formatMs(
  1. int ms, {
  2. bool isUtc = false,
  3. String format = "yyyy-MM-dd HH:mm:ss",
})

Implementation

static String formatMs(int ms, {bool isUtc = false, String format = "yyyy-MM-dd HH:mm:ss"}){
  var date = DateTime.fromMillisecondsSinceEpoch(ms, isUtc: isUtc);
  return DateFormat(format).format(date);
}