DatePicker constructor

DatePicker(
  1. DateTime startDate, {
  2. Key? key,
  3. double width = 60,
  4. double height = 80,
  5. DatePickerController? controller,
  6. TextStyle monthTextStyle = defaultMonthTextStyle,
  7. TextStyle dayTextStyle = defaultDayTextStyle,
  8. TextStyle dateTextStyle = defaultDateTextStyle,
  9. Color selectedTextColor = Colors.white,
  10. Color selectionColor = AppColors.defaultSelectionColor,
  11. Color deactivatedColor = AppColors.defaultDeactivatedColor,
  12. DateTime? initialSelectedDate,
  13. List<DateTime>? activeDates,
  14. List<DateTime>? inactiveDates,
  15. int daysCount = 500,
  16. DateChangeListener? onDateChange,
  17. 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.");