getLastDate function

DateTime? getLastDate(
  1. Iterable<DateTime>? dates
)

Returns the last date in the list of dates.

Implementation

DateTime? getLastDate(Iterable<DateTime>? dates) =>
    dates?.tryReduce((a, b) => a.isAfter(b) ? a : b);