showDateTimePicker static method

Future<DateTime?> showDateTimePicker(
  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. dynamic theme,
  11. double? squeeze,
  12. double? diameterRatio,
})

Display date&time picker bottom sheet.

Implementation

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