isSameOrBeforeDate function Null safety

bool isSameOrBeforeDate(
  1. dynamic lastDate,
  2. dynamic date
)

Check the date before/same of last date

Implementation

bool isSameOrBeforeDate(dynamic lastDate, dynamic date) {
  return isSameDate(lastDate, date) || lastDate.isAfter(date) == true;
}