checkYearisDisabled static method
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));
}