CalendarDatePicker2Config constructor
CalendarDatePicker2Config({
- CalendarDatePicker2Type? calendarType,
- DateTime? firstDate,
- DateTime? lastDate,
- DateTime? currentDate,
- CalendarDatePicker2Mode? calendarViewMode,
- List<
String> ? weekdayLabels, - TextStyle? weekdayLabelTextStyle,
- WeekdayLabelBuilder? weekdayLabelBuilder,
- int? firstDayOfWeek,
- double? controlsHeight,
- Widget? lastMonthIcon,
- bool? hideLastMonthIcon,
- Widget? nextMonthIcon,
- bool? hideNextMonthIcon,
- TextStyle? controlsTextStyle,
- bool? animateToDisplayedMonthDate,
- Map<
CalendarDatePicker2SemanticsLabel, String?> ? semanticsDictionary, - bool? disableVibration,
- PageController? dayViewController,
- TextStyle? dayTextStyle,
- TextStyle? selectedDayTextStyle,
- Color? selectedDayHighlightColor,
- Color? selectedRangeHighlightColor,
- TextStyle? disabledDayTextStyle,
- TextStyle? todayTextStyle,
- TextStyle? yearTextStyle,
- TextStyle? selectedYearTextStyle,
- TextStyle? disabledYearTextStyle,
- TextStyle? monthTextStyle,
- TextStyle? selectedMonthTextStyle,
- TextStyle? disabledMonthTextStyle,
- BorderRadius? dayBorderRadius,
- BorderRadius? yearBorderRadius,
- BorderRadius? monthBorderRadius,
- SelectableDayPredicate? selectableDayPredicate,
- SelectableMonthPredicate? selectableMonthPredicate,
- SelectableYearPredicate? selectableYearPredicate,
- DayTextStylePredicate? dayTextStylePredicate,
- DayBuilder? dayBuilder,
- YearBuilder? yearBuilder,
- MonthBuilder? monthBuilder,
- ScrollController? monthViewController,
- ScrollController? yearViewController,
- bool? disableModePicker,
- bool? centerAlignModePicker,
- Widget? customModePickerIcon,
- ModePickerTextHandler? modePickerTextHandler,
- ModePickerBuilder? modePickerBuilder,
- double? modePickersGap,
- TextStyle? selectedRangeDayTextStyle,
- bool? rangeBidirectional,
- ScrollPhysics? calendarViewScrollPhysics,
- Color? daySplashColor,
- bool? allowSameValueSelection,
- bool? disableMonthPicker,
- bool? useAbbrLabelForMonthModePicker,
- double? dayMaxWidth,
- bool? hideMonthPickerDividers,
- bool? hideYearPickerDividers,
- TextStyle? scrollViewTopHeaderTextStyle,
- bool? hideScrollViewTopHeader,
- bool? hideScrollViewTopHeaderDivider,
- bool? hideScrollViewMonthWeekHeader,
- BoxConstraints? scrollViewConstraints,
- ScrollViewMonthYearBuilder? scrollViewMonthYearBuilder,
- ScrollViewOnScrolling? scrollViewOnScrolling,
- ScrollController? scrollViewController,
- bool? dynamicCalendarRows,
- Axis? dayModeScrollDirection,
- SelectedRangeHighlightBuilder? selectedRangeHighlightBuilder,
- SelectedRangeDecorationPredicate? selectedRangeDecorationPredicate,
Implementation
CalendarDatePicker2Config({
CalendarDatePicker2Type? calendarType,
DateTime? firstDate,
DateTime? lastDate,
DateTime? currentDate,
CalendarDatePicker2Mode? calendarViewMode,
this.weekdayLabels,
this.weekdayLabelTextStyle,
this.weekdayLabelBuilder,
this.firstDayOfWeek,
this.controlsHeight,
this.lastMonthIcon,
this.hideLastMonthIcon,
this.nextMonthIcon,
this.hideNextMonthIcon,
this.controlsTextStyle,
this.animateToDisplayedMonthDate,
this.semanticsDictionary,
this.disableVibration,
this.dayViewController,
this.dayTextStyle,
this.selectedDayTextStyle,
this.selectedDayHighlightColor,
this.selectedRangeHighlightColor,
this.disabledDayTextStyle,
this.todayTextStyle,
this.yearTextStyle,
this.selectedYearTextStyle,
this.disabledYearTextStyle,
this.monthTextStyle,
this.selectedMonthTextStyle,
this.disabledMonthTextStyle,
this.dayBorderRadius,
this.yearBorderRadius,
this.monthBorderRadius,
this.selectableDayPredicate,
this.selectableMonthPredicate,
this.selectableYearPredicate,
this.dayTextStylePredicate,
this.dayBuilder,
this.yearBuilder,
this.monthBuilder,
this.monthViewController,
this.yearViewController,
this.disableModePicker,
this.centerAlignModePicker,
this.customModePickerIcon,
this.modePickerTextHandler,
this.modePickerBuilder,
this.modePickersGap,
this.selectedRangeDayTextStyle,
this.rangeBidirectional,
this.calendarViewScrollPhysics,
this.daySplashColor,
this.allowSameValueSelection,
this.disableMonthPicker,
this.useAbbrLabelForMonthModePicker,
this.dayMaxWidth,
this.hideMonthPickerDividers,
this.hideYearPickerDividers,
this.scrollViewTopHeaderTextStyle,
this.hideScrollViewTopHeader,
this.hideScrollViewTopHeaderDivider,
this.hideScrollViewMonthWeekHeader,
this.scrollViewConstraints,
this.scrollViewMonthYearBuilder,
this.scrollViewOnScrolling,
this.scrollViewController,
this.dynamicCalendarRows,
this.dayModeScrollDirection,
this.selectedRangeHighlightBuilder,
this.selectedRangeDecorationPredicate,
}) : calendarType = calendarType ?? CalendarDatePicker2Type.single,
firstDate = DateUtils.dateOnly(firstDate ?? DateTime(1970)),
lastDate =
DateUtils.dateOnly(lastDate ?? DateTime(DateTime.now().year + 50)),
currentDate = currentDate ?? DateUtils.dateOnly(DateTime.now()),
calendarViewMode = calendarViewMode ?? CalendarDatePicker2Mode.day;