CalendarStyle constructor

CalendarStyle({
  1. BoxDecoration? todayDecoration,
  2. BoxDecoration? selectedDecoration,
  3. TextStyle? dayTextStyle,
  4. TextStyle? selectedDayTextStyle,
  5. TextStyle? todayTextStyle,
  6. TextStyle? headerTextStyle,
  7. TextStyle? comboboxTextStyle,
  8. TextStyle? formatTextStyle,
  9. TextStyle? weekdayTextStyle,
})

Creates a calendar style with optional custom styling.

If todayDecoration is not provided, defaults to a blue circle. If selectedDecoration is not provided, defaults to a red circle. Text styles default to appropriate values if not specified.

Implementation

CalendarStyle({
  BoxDecoration? todayDecoration,
  BoxDecoration? selectedDecoration,
  this.dayTextStyle,
  this.selectedDayTextStyle,
  this.todayTextStyle,
  this.headerTextStyle,
  this.comboboxTextStyle,
  this.formatTextStyle,
  this.weekdayTextStyle,
})  : todayDecoration = todayDecoration ??
          const BoxDecoration(
            color: Colors.blue,
            shape: BoxShape.circle,
          ),
      selectedDecoration = selectedDecoration ??
          const BoxDecoration(
            color: Colors.red,
            shape: BoxShape.circle,
          );