WeekCalendar.minimal constructor

const WeekCalendar.minimal({
  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. WeekCalendarStyle calendarStyle = const WeekCalendarStyle(dayIndicatorSize: 32, monthHeaderStyle: TextStyle(fontSize: 14), selectedDayTextStyle: TextStyle(fontWeight: FontWeight.bold)),
  10. Duration? animationDuration,
  11. Curve? animationCurve,
  12. bool showMonthHeader = true,
  13. IconData? previousMonthIcon = Icons.chevron_left,
  14. IconData? nextMonthIcon = Icons.chevron_right,
  15. Color? iconColor,
  16. Weekday? startingDay,
  17. bool enableAnimations = true,
  18. dynamic onHeaderDateTapped(
    1. Offset widgetPosition
    )?,
  19. dynamic onHeaderTodayDate(
    1. Offset widgetPosition
    )?,
  20. bool isUtc = true,
  21. bool showCalendarPopupOnHeaderTap = true,
})

Preconfigured constructor for minimal variant

Implementation

const WeekCalendar.minimal({
  super.key,
  required this.initialDate,
  required this.selectedDate,
  required this.onDateSelected,
  this.onNextMonth,
  this.onPreviousMonth,
  this.onPreviousWeek,
  this.onNextWeek,
  this.calendarStyle = const WeekCalendarStyle(
    dayIndicatorSize: 32,
    monthHeaderStyle: TextStyle(fontSize: 14),
    selectedDayTextStyle: TextStyle(fontWeight: FontWeight.bold),
  ),
  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,
}) : calendarType = WeekCalendarType.minimal;