DatePicker constructor
DatePicker(
- DateTime startDate, {
- Key? key,
- double width = 60,
- double height = 80,
- DatePickerController? controller,
- TextStyle monthTextStyle = defaultMonthTextStyle,
- TextStyle dayTextStyle = defaultDayTextStyle,
- TextStyle dateTextStyle = defaultDateTextStyle,
- Color selectedTextColor = Colors.white,
- Color selectionColor = AppColors.defaultSelectionColor,
- Color deactivatedColor = AppColors.defaultDeactivatedColor,
- DateTime? initialSelectedDate,
- List<
DateTime> ? activeDates, - List<
DateTime> ? inactiveDates, - int daysCount = 500,
- DateChangeListener? onDateChange,
- String locale = "en_US",
Implementation
DatePicker(
this.startDate, {
Key? key,
this.width = 60,
this.height = 80,
this.controller,
this.monthTextStyle = defaultMonthTextStyle,
this.dayTextStyle = defaultDayTextStyle,
this.dateTextStyle = defaultDateTextStyle,
this.selectedTextColor = Colors.white,
this.selectionColor = AppColors.defaultSelectionColor,
this.deactivatedColor = AppColors.defaultDeactivatedColor,
this.initialSelectedDate,
this.activeDates,
this.inactiveDates,
this.daysCount = 500,
this.onDateChange,
this.locale = "en_US",
}) : assert(
activeDates == null || inactiveDates == null,
"Can't "
"provide both activated and deactivated dates List at the same time.");