DatePickerWidget constructor
DatePickerWidget({
- Key? key,
- DateTime? firstDate,
- DateTime? lastDate,
- DateTime? initialDate,
- String? dateFormat = DATETIME_PICKER_DATE_FORMAT,
- DateTimePickerLocale? locale = DATETIME_PICKER_LOCALE_DEFAULT,
- DateTimePickerTheme? pickerTheme = DateTimePickerTheme.Default,
- DateVoidCallback? onCancel,
- DateValueCallback? onChange,
- DateValueCallback? onConfirm,
- bool looping = false,
Implementation
DatePickerWidget({
Key? key,
this.firstDate,
this.lastDate,
this.initialDate,
this.dateFormat = DATETIME_PICKER_DATE_FORMAT,
this.locale = DATETIME_PICKER_LOCALE_DEFAULT,
this.pickerTheme = DateTimePickerTheme.Default,
this.onCancel,
this.onChange,
this.onConfirm,
this.looping = false,
}) : super(key: key) {
DateTime minTime = firstDate ?? DateTime.parse(DATE_PICKER_MIN_DATETIME);
DateTime maxTime = lastDate ?? DateTime.parse(DATE_PICKER_MAX_DATETIME);
assert(minTime.compareTo(maxTime) < 0);
}