CalendarHeaderView constructor

const CalendarHeaderView({
  1. Key? key,
  2. required ValueChanged<DateTime> onMonthChanged,
  3. TextStyle? textStyle,
  4. Color? iconColor,
  5. Color? selectedMonthColor,
  6. Color? unselectedMonthColor,
  7. BoxDecoration? monthItemDecoration,
  8. double height = 320,
  9. int crossAxisCount = 3,
  10. double childAspectRatio = 2.5,
})

Constructor for CalendarHeaderView

  • onMonthChanged - Callback when month changes
  • textStyle - Text style for the month/year label
  • iconColor - Color for the previous/next arrow icons
  • selectedMonthColor - Color of selected month in the picker grid
  • unselectedMonthColor - Color of unselected months in the picker grid
  • monthItemDecoration - Decoration for each month cell
  • height - Height of the bottom sheet
  • crossAxisCount - Number of columns in month grid
  • childAspectRatio - Aspect ratio for month grid items

Implementation

const CalendarHeaderView({
  super.key,
  required this.onMonthChanged,
  this.textStyle,
  this.iconColor,
  this.selectedMonthColor,
  this.unselectedMonthColor,
  this.monthItemDecoration,
  this.height = 320,
  this.crossAxisCount = 3,
  this.childAspectRatio = 2.5,
});