DateTimePickerWidget constructor
DateTimePickerWidget({
- Key? key,
- DateTime? minDateTime,
- DateTime? maxDateTime,
- DateTime? initDateTime,
- String dateFormat = DATETIME_PICKER_TIME_FORMAT,
- String dateFormatSeparator = DATE_FORMAT_SEPARATOR,
- DateTimePickerLocale locale = DATETIME_PICKER_LOCALE_DEFAULT,
- DateTimePickerTheme pickerTheme = DateTimePickerTheme.Default,
- int minuteDivider = 1,
- DateVoidCallback? onCancel,
- DateValueCallback? onChange,
- DateValueCallback? onConfirm,
- 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);
}