CalendarView constructor

CalendarView(
  1. int year,
  2. int month
)

Creates a CalendarView for the specified year and month.

Parameters:

  • year (int): Four-digit year value
  • month (int): Month number (1-12, where 1 = January)

Throws AssertionError if month is not between 1 and 12.

Example:

final view = CalendarView(2024, 3); // March 2024

Implementation

CalendarView(this.year, this.month) {
  assert(month >= 1 && month <= 12, 'Month must be between 1 and 12');
}