showDatePicker static method

Future<DateTime?> showDatePicker(
  1. BuildContext context, {
  2. bool showTitleActions = true,
  3. DateTime? minTime,
  4. DateTime? maxTime,
  5. DateChangedCallback? onChanged,
  6. DateChangedCallback? onConfirm,
  7. DateCancelledCallback? onCancel,
  8. dynamic locale = LocaleType.en,
  9. DateTime? currentTime,
  10. DatePickerTheme? theme,
})

Display date picker bottom sheet.

Implementation

static Future<DateTime?> showDatePicker(
  BuildContext context, {
  bool showTitleActions = true,
  DateTime? minTime,
  DateTime? maxTime,
  DateChangedCallback? onChanged,
  DateChangedCallback? onConfirm,
  DateCancelledCallback? onCancel,
  locale = LocaleType.en,
  DateTime? currentTime,
  DatePickerTheme? theme,
}) async {
  return await Navigator.push(
    context,
    _DatePickerRoute(
      showTitleActions: showTitleActions,
      onChanged: onChanged,
      onConfirm: onConfirm,
      onCancel: onCancel,
      locale: locale,
      theme: theme,
      barrierLabel:
          MaterialLocalizations.of(context).modalBarrierDismissLabel,
      pickerModel: DatePickerModel(
        currentTime: currentTime,
        maxTime: maxTime,
        minTime: minTime,
        locale: locale,
      ),
    ),
  );
}