TableCalendarBaseCustomize constructor

TableCalendarBaseCustomize({
  1. Key? key,
  2. required DateTime firstDay,
  3. required DateTime lastDay,
  4. required DateTime focusedDay,
  5. CalendarFormat calendarFormat = CalendarFormat.month,
  6. CalendarTypeMode calendarTypeMode = CalendarTypeMode.day,
  7. DayBuilder? dowBuilder,
  8. required FocusedDayBuilder dayBuilder,
  9. required FocusedDayBuilder yearBuilder,
  10. double? dowHeight,
  11. required double rowHeight,
  12. bool sixWeekMonthsEnforced = false,
  13. bool dowVisible = true,
  14. bool dividerVisible = true,
  15. DayBuilder? weekNumberBuilder,
  16. bool weekNumbersVisible = false,
  17. Decoration? dowDecoration,
  18. Decoration? rowDecoration,
  19. TableBorder? tableBorder,
  20. EdgeInsets? tablePadding,
  21. Duration formatAnimationDuration = const Duration(milliseconds: 200),
  22. Curve formatAnimationCurve = Curves.linear,
  23. bool pageAnimationEnabled = true,
  24. Duration pageAnimationDuration = const Duration(milliseconds: 300),
  25. Curve pageAnimationCurve = Curves.easeOut,
  26. StartingDayOfWeek startingDayOfWeek = StartingDayOfWeek.sunday,
  27. AvailableGestures availableGestures = AvailableGestures.all,
  28. SimpleSwipeConfig simpleSwipeConfig = const SimpleSwipeConfig(verticalThreshold: 25.0, swipeDetectionBehavior: SwipeDetectionBehavior.continuousDistinct),
  29. Map<CalendarFormat, String> availableCalendarFormats = const {CalendarFormat.month : 'Month', CalendarFormat.twoWeeks : '2 weeks', CalendarFormat.week : 'Week'},
  30. Map<CalendarTypeMode, String> availableCalendarTypeModes = const {CalendarTypeMode.day : 'Day', CalendarTypeMode.year : 'Year'},
  31. SwipeCallback? onVerticalSwipe,
  32. void onPageChanged(
    1. DateTime focusedDay
    )?,
  33. void onCalendarCreated(
    1. PageController pageController
    )?,
  34. void onDragEnd(
    1. CalendarFormat format
    )?,
  35. void onTapItemTypeModeYear(
    1. int year
    )?,
})

Implementation

TableCalendarBaseCustomize({
  Key? key,
  required this.firstDay,
  required this.lastDay,
  required this.focusedDay,
  this.calendarFormat = CalendarFormat.month,
  this.calendarTypeMode = CalendarTypeMode.day,
  this.dowBuilder,
  required this.dayBuilder,
  required this.yearBuilder,
  this.dowHeight,
  required this.rowHeight,
  this.sixWeekMonthsEnforced = false,
  this.dowVisible = true,
  this.dividerVisible = true,
  this.weekNumberBuilder,
  this.weekNumbersVisible = false,
  this.dowDecoration,
  this.rowDecoration,
  this.tableBorder,
  this.tablePadding,
  this.formatAnimationDuration = const Duration(milliseconds: 200),
  this.formatAnimationCurve = Curves.linear,
  this.pageAnimationEnabled = true,
  this.pageAnimationDuration = const Duration(milliseconds: 300),
  this.pageAnimationCurve = Curves.easeOut,
  this.startingDayOfWeek = StartingDayOfWeek.sunday,
  this.availableGestures = AvailableGestures.all,
  this.simpleSwipeConfig = const SimpleSwipeConfig(
    verticalThreshold: 25.0,
    swipeDetectionBehavior: SwipeDetectionBehavior.continuousDistinct,
  ),
  this.availableCalendarFormats = const {
    CalendarFormat.month: 'Month',
    CalendarFormat.twoWeeks: '2 weeks',
    CalendarFormat.week: 'Week',
  },
  this.availableCalendarTypeModes = const {
    CalendarTypeMode.day: 'Day',
    CalendarTypeMode.year: 'Year',
  },
  this.onVerticalSwipe,
  this.onPageChanged,
  this.onCalendarCreated,
  this.onDragEnd,
  this.onTapItemTypeModeYear,
})  : assert(!dowVisible || (dowHeight != null && dowBuilder != null)),
      assert(isSameDay(focusedDay, firstDay) || focusedDay.isAfter(firstDay)),
      assert(isSameDay(focusedDay, lastDay) || focusedDay.isBefore(lastDay)),
      super(key: key);