DialogDate constructor
const
DialogDate({
- Key? key,
- String? title,
- required ValueChanged<
DateTime> onConfirm, - DateStateBuilder? stateBuilder,
- String confirmText = "Done",
- String cancelText = "Cancel",
- DateTime? initialDate,
Constructs a DialogDate widget.
The onConfirm callback is required and will be called with the selected date
upon user confirmation. title sets the optional dialog header text.
initialDate pre-selects a date if provided. confirmText and cancelText
customize button labels, defaulting to "Done" and "Cancel" respectively.
stateBuilder allows custom state management for the date picker.
Implementation
const DialogDate(
{super.key,
this.title,
required this.onConfirm,
this.stateBuilder,
this.confirmText = "Done",
this.cancelText = "Cancel",
this.initialDate});