DialogDate constructor

const DialogDate({
  1. Key? key,
  2. String? title,
  3. required ValueChanged<DateTime> onConfirm,
  4. DateStateBuilder? stateBuilder,
  5. String confirmText = "Done",
  6. String cancelText = "Cancel",
  7. 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});