millisSinceEpochToDisplayString function

String millisSinceEpochToDisplayString(
  1. double millisSinceEpoch
)

Implementation

String millisSinceEpochToDisplayString(double millisSinceEpoch) {
  final dateTime = DateTime.fromMillisecondsSinceEpoch(
    millisSinceEpoch.toInt(),
  );
  final date = DateFormat('y-MM-dd HH:mm').format(dateTime);

  final ago = timeago.format(dateTime);

  return '$date ($ago)';
}