CalendarYear constructor

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

Implementation

CalendarYear(int year, CalendarState? state,
    {this.startingWeekday = DateTime.monday})
    : _start = Date(year),
      super(state) {
  _title = _start.format(DateFormat.y());
  if (state?._resolutionAtLeast(CalendarResolution.years) ?? false) {
    _months = [];
  } else {
    _months = _generateMonths().toList();
  }
  _updateHighlights();
}