CalendarHeaderView constructor
const
CalendarHeaderView({
- Key? key,
- required ValueChanged<
DateTime> onMonthChanged, - DateTime? displayedMonth,
- TextStyle? textStyle,
- Color? iconColor,
- Color? selectedMonthColor,
- Color? unselectedMonthColor,
- BoxDecoration? monthItemDecoration,
- double height = 320,
- int crossAxisCount = 3,
- double childAspectRatio = 2.5,
- CalendarAnimations? animations,
Constructor for CalendarHeaderView
onMonthChanged- Callback when month changesdisplayedMonth- Optional direct month to display (avoids provider requirement)textStyle- Text style for the month/year labeliconColor- Color for the previous/next arrow iconsselectedMonthColor- Color of selected month in the picker gridunselectedMonthColor- Color of unselected months in the picker gridmonthItemDecoration- Decoration for each month cellheight- Height of the bottom sheetcrossAxisCount- Number of columns in month gridchildAspectRatio- Aspect ratio for month grid items
Implementation
const CalendarHeaderView({
super.key,
required this.onMonthChanged,
this.displayedMonth,
this.textStyle,
this.iconColor,
this.selectedMonthColor,
this.unselectedMonthColor,
this.monthItemDecoration,
this.height = 320,
this.crossAxisCount = 3,
this.childAspectRatio = 2.5,
this.animations,
});