CalendarWeek constructor

CalendarWeek(
  1. Date _start,
  2. CalendarState? state, [
  3. int _startingWeekday = DateTime.monday
])

Implementation

CalendarWeek(this._start, CalendarState? state,
    [this._startingWeekday = DateTime.monday])
    : super(state) {
  _end = _start.add(days: numDays - 1);
  if (_end!.isAfter(_endOfMonth)) {
    _end = _endOfMonth;
  }

  if (state?._resolutionAtLeast(CalendarResolution.weeks) ?? false) {
    _days = [];
  } else {
    _days = _generateDays().toList();
  }
  _spacers = List.filled(numBlankDays, null, growable: false);
  _updateHighlights();
}