DatePickerWidget constructor
DatePickerWidget({
- Key? key,
- dynamic onMonthChangeStartWithFirstDate,
- DateTime? minDateTime,
- DateTime? maxDateTime,
- DateTime? initialDateTime,
- String? dateFormat = DATETIME_PICKER_DATE_FORMAT,
- DateTimePickerLocale locale = DATETIME_PICKER_LOCALE_DEFAULT,
- DateTimePickerTheme pickerTheme = DateTimePickerTheme.Default,
- DateVoidCallback? onCancel,
- DateValueCallback? onChange,
- 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);
}