listOfValidDatesInMonth static method
Implementation
static List<DateTime> listOfValidDatesInMonth(
Month month,
List<int> weekdaysToHide,
) {
final totalDays = month.daysInMonth;
final validDates = <DateTime>[];
for (int i = 1; i <= totalDays; i++) {
final date = DateTime(month.year, month.month, i);
if (!weekdaysToHide.contains(date.weekday)) {
validDates.add(date);
}
}
return (validDates);
}