DatePickerBuilder typedef

DatePickerBuilder = Future<DateTime?> Function(BuildContext context, DateTime currentDate)

Signature for a custom date-picker dialog.

context — the build context. currentDate — the date currently shown in the text field (or DatePickerTextField.initialDate on first open).

Return the selected DateTime or null if the user cancelled.

Implementation

typedef DatePickerBuilder = Future<DateTime?> Function(
  BuildContext context,
  DateTime currentDate,
);