isDateSelected method
If a given date is selected in the calendar
Implementation
bool isDateSelected(DateTime date) {
if (widget.selectionMode == SelectionMode.single) {
return CalendarHelper.isSameDay(selectedSingleDate!, date);
} else {
final DateTime? matchedSelectedDate = selectedDates!
.firstWhereOrNull((DateTime d) => CalendarHelper.isSameDay(d, date));
return matchedSelectedDate != null;
}
}