CalendarMonth constructor

CalendarMonth(
  1. int year,
  2. int month, {
  3. CalendarState? state,
  4. int startingWeekday = DateTime.monday,
})

Implementation

CalendarMonth(int year, int month,
    {CalendarState? state, this.startingWeekday = DateTime.monday})
    : _start = Date(year, month),
      calendarState = state {
  _title = _start.format(DateFormat.yMMM());
  if (state?._resolutionAtLeast(CalendarResolution.months) ?? false) {
    _weeks = [];
  } else {
    _weeks = _generateWeeks().toList();
  }
  update(state);
}