TableCalendarBaseCustomize constructor
TableCalendarBaseCustomize({
- Key? key,
- required DateTime firstDay,
- required DateTime lastDay,
- required DateTime focusedDay,
- CalendarFormat calendarFormat = CalendarFormat.month,
- CalendarTypeMode calendarTypeMode = CalendarTypeMode.day,
- DayBuilder? dowBuilder,
- required FocusedDayBuilder dayBuilder,
- required FocusedDayBuilder yearBuilder,
- double? dowHeight,
- required double rowHeight,
- bool sixWeekMonthsEnforced = false,
- bool dowVisible = true,
- bool dividerVisible = true,
- DayBuilder? weekNumberBuilder,
- bool weekNumbersVisible = false,
- Decoration? dowDecoration,
- Decoration? rowDecoration,
- TableBorder? tableBorder,
- EdgeInsets? tablePadding,
- Duration formatAnimationDuration = const Duration(milliseconds: 200),
- Curve formatAnimationCurve = Curves.linear,
- bool pageAnimationEnabled = true,
- Duration pageAnimationDuration = const Duration(milliseconds: 300),
- Curve pageAnimationCurve = Curves.easeOut,
- StartingDayOfWeek startingDayOfWeek = StartingDayOfWeek.sunday,
- AvailableGestures availableGestures = AvailableGestures.all,
- SimpleSwipeConfig simpleSwipeConfig = const SimpleSwipeConfig(verticalThreshold: 25.0, swipeDetectionBehavior: SwipeDetectionBehavior.continuousDistinct),
- Map<
CalendarFormat, String> availableCalendarFormats = const {CalendarFormat.month : 'Month', CalendarFormat.twoWeeks : '2 weeks', CalendarFormat.week : 'Week'}, - Map<
CalendarTypeMode, String> availableCalendarTypeModes = const {CalendarTypeMode.day : 'Day', CalendarTypeMode.year : 'Year'}, - SwipeCallback? onVerticalSwipe,
- void onPageChanged(
- DateTime focusedDay
- void onCalendarCreated(
- PageController pageController
- void onDragEnd(
- CalendarFormat format
- void onTapItemTypeModeYear(
- 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);