DialogDateRange constructor

const DialogDateRange({
  1. Key? key,
  2. String? title,
  3. required ValueChanged<DateTimeRange> onConfirm,
  4. DateStateBuilder? stateBuilder,
  5. String confirmText = "Done",
  6. String cancelText = "Cancel",
  7. DateTimeRange? initialRange,
})

Constructs a DialogDateRange instance with the specified configuration.

The onConfirm callback is mandatory and handles the selected range post-confirmation. title sets an optional header for the dialog. stateBuilder provides customization for date states, akin to DateMulti. initialRange pre-selects dates if supplied. confirmText and cancelText allow button text overrides, with sensible defaults.

Implementation

const DialogDateRange(
    {super.key,
    this.title,
    required this.onConfirm,
    this.stateBuilder,
    this.confirmText = "Done",
    this.cancelText = "Cancel",
    this.initialRange});