checkYearisDisabled static method

bool checkYearisDisabled({
  1. required List<DateTime> listOfDates,
  2. required DateTime date,
})

Checking for date in listOfDates if it contains the same year then it returns false else returns true

Implementation

static bool checkYearisDisabled(
    {required List<DateTime> listOfDates, required DateTime date}) {
  return !listOfDates.any((element) => (element.year == date.year));
}