selectedDates property

List<DateTime> get selectedDates

The currently selected dates, if any.

Returns a single-item list for single-date selection, all dates in the range for range selection, or an empty list if nothing is selected.

Implementation

List<DateTime> get selectedDates {
  if (_monthlyProvider != null) {
    return _monthlyProvider!.selectedDates;
  }
  if (_weeklyProvider != null && _weeklyProvider!.userPicked != null) {
    return [_weeklyProvider!.userPicked!];
  }
  if (_horizontalProvider != null &&
      _horizontalProvider!.selectedDay.year != 0) {
    return [_horizontalProvider!.selectedDay];
  }
  return const [];
}