formattedDateFromTimestamp method

String formattedDateFromTimestamp({
  1. String format = 'dd.MM.yyyy',
})

Returns a formatted date string from a timestamp in seconds.

Example:

1622505600.dateFromTimestamp(); // Returns "01.06.2021"

Implementation

String formattedDateFromTimestamp({
  String format = 'dd.MM.yyyy',
}) {
  return DateFormat(format).format(dateTimeFromTimestamp);
}