format method
yy-MM-dd hh:mm:ss @param time 秒级
Implementation
String format(int time, {String format = 'yy-MM-dd hh:mm:ss'}) {
final DateTime date = DateTime.fromMillisecondsSinceEpoch(time * 1000);
final formatter = DateFormat(format);
return formatter.format(date);
}