WeekCalendar constructor

const WeekCalendar({
  1. Key? key,
  2. required DateTime initialDate,
  3. required DateTime selectedDate,
  4. required ValueChanged<DateTime> onDateSelected,
  5. VoidCallback? onNextMonth,
  6. VoidCallback? onPreviousMonth,
  7. VoidCallback? onPreviousWeek,
  8. VoidCallback? onNextWeek,
  9. WeekCalendarType calendarType = WeekCalendarType.standard,
  10. WeekCalendarStyle calendarStyle = const WeekCalendarStyle(),
  11. Duration? animationDuration,
  12. Curve? animationCurve,
  13. bool showMonthHeader = true,
  14. IconData? previousMonthIcon = Icons.chevron_left,
  15. IconData? nextMonthIcon = Icons.chevron_right,
  16. Color? iconColor,
  17. Weekday? startingDay,
  18. bool enableAnimations = true,
  19. dynamic onHeaderDateTapped(
    1. Offset widgetPosition
    )?,
  20. dynamic onHeaderTodayDate(
    1. Offset widgetPosition
    )?,
  21. bool isUtc = true,
  22. bool showCalendarPopupOnHeaderTap = true,
})

Default constructor for standard calendar

Implementation

const WeekCalendar({
  super.key,
  required this.initialDate,
  required this.selectedDate,
  required this.onDateSelected,
  this.onNextMonth,
  this.onPreviousMonth,
  this.onPreviousWeek,
  this.onNextWeek,
  this.calendarType = WeekCalendarType.standard,
  this.calendarStyle = const WeekCalendarStyle(),
  this.animationDuration,
  this.animationCurve,
  this.showMonthHeader = true,
  this.previousMonthIcon = Icons.chevron_left,
  this.nextMonthIcon = Icons.chevron_right,
  this.iconColor,
  this.startingDay,
  this.enableAnimations = true,
  this.onHeaderDateTapped,
  this.onHeaderTodayDate,
  this.isUtc = true,
  this.showCalendarPopupOnHeaderTap = true,
});