setValidDate method Null safety

String setValidDate(
  1. {required String fromDate,
  2. required String toDate}
)

Implementation

static String setValidDate(
    {required String fromDate, required String toDate}) {
  if (DateTimes.validDateRange(fromDate: fromDate, toDate: toDate)) {
    return toDate;
  } else {
    return fromDate;
  }
}