DateTimePickerWidget constructor

DateTimePickerWidget({
  1. Key? key,
  2. DateTime? minDateTime,
  3. DateTime? maxDateTime,
  4. DateTime? initDateTime,
  5. String dateFormat = DATETIME_PICKER_TIME_FORMAT,
  6. String dateFormatSeparator = DATE_FORMAT_SEPARATOR,
  7. DateTimePickerLocale locale = DATETIME_PICKER_LOCALE_DEFAULT,
  8. DateTimePickerTheme pickerTheme = DateTimePickerTheme.Default,
  9. int minuteDivider = 1,
  10. DateVoidCallback? onCancel,
  11. DateValueCallback? onChange,
  12. DateValueCallback? onConfirm,
  13. bool onMonthChangeStartWithFirstDate = false,
})

Implementation

DateTimePickerWidget({
  Key? key,
  this.minDateTime,
  this.maxDateTime,
  this.initDateTime,
  this.dateFormat: DATETIME_PICKER_TIME_FORMAT,
  this.dateFormatSeparator: DATE_FORMAT_SEPARATOR,
  this.locale: DATETIME_PICKER_LOCALE_DEFAULT,
  this.pickerTheme: DateTimePickerTheme.Default,
  this.minuteDivider = 1,
  this.onCancel,
  this.onChange,
  this.onConfirm,
  this.onMonthChangeStartWithFirstDate = false,
}) : 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);
}