fromInt static method
Get the time string in the specified format from the digital timestamp.
time
Timestamp to be processed.
format
Format time string.
timeUnit
The unit of the timestamp to be processed.
Implementation
static String fromInt(
int time, {
String format = 'yyyy-MM-dd hh:mm:ss',
TimeUnit timeUnit = TimeUnit.millisecond,
}) {
late IDKitTimeFormat idkitTimeFormat = IDKitTimeFormat();
final DateTime dateTime = idkitTimeFormat.dateFromInt(time, timeUnit);
return idkitTimeFormat.stringFrom(dateTime, format);
}