prettyDateString method

String prettyDateString(
  1. DateTime date
)

Implementation

String prettyDateString(DateTime date) {
  if (date.year == DateTime.now().year) {
    return "${date.day}. ${months.monthShort(date)}, ${date.timeString}";
  } else {
    return "${date.day}. ${months.monthShort(date)} ${date.year}, ${date.timeString}";
  }
}