DatePickerWidget constructor

DatePickerWidget({
  1. Key? key,
  2. dynamic onMonthChangeStartWithFirstDate,
  3. DateTime? minDateTime,
  4. DateTime? maxDateTime,
  5. DateTime? initialDateTime,
  6. String? dateFormat = DATETIME_PICKER_DATE_FORMAT,
  7. DateTimePickerLocale locale = DATETIME_PICKER_LOCALE_DEFAULT,
  8. DateTimePickerTheme pickerTheme = DateTimePickerTheme.Default,
  9. DateVoidCallback? onCancel,
  10. DateValueCallback? onChange,
  11. DateValueCallback? onConfirm,
})

Implementation

DatePickerWidget({
  Key? key,
  this.onMonthChangeStartWithFirstDate,
  this.minDateTime,
  this.maxDateTime,
  this.initialDateTime,
  this.dateFormat: DATETIME_PICKER_DATE_FORMAT,
  this.locale: DATETIME_PICKER_LOCALE_DEFAULT,
  this.pickerTheme: DateTimePickerTheme.Default,
  this.onCancel,
  this.onChange,
  this.onConfirm,
}) : super(key: key) {
  DateTime minTime = minDateTime ?? DateTime.parse(DATE_PICKER_MIN_DATETIME);
  DateTime maxTime = maxDateTime ?? DateTime.parse(DATE_PICKER_MAX_DATETIME);
  assert(minTime.compareTo(maxTime) < 0);
}