formatDate function

String formatDate(
  1. Date? date, [
  2. DateFormat? format
])

Formats the date, or returns '' if the date is null.

Implementation

String formatDate(Date? date, [DateFormat? format]) =>
    date?.format(format ?? _dateFormat) ?? '';