showDP method

Future<DateTime?> showDP({
  1. required DateTime initialDate,
  2. required DateTime firstDate,
  3. required DateTime lastDate,
  4. DatePickerEntryMode initialEntryMode = material.DatePickerEntryMode.calendar,
  5. SelectableDayPredicate? selectableDayPredicate,
  6. String? helpText,
  7. String? cancelText,
  8. String? confirmText,
  9. Locale? locale,
  10. bool useRootNavigator = true,
  11. RouteSettings? routeSettings,
  12. TextDirection? textDirection,
  13. TransitionBuilder? builder,
  14. DatePickerMode initialDatePickerMode = material.DatePickerMode.day,
  15. String? errorFormatText,
  16. String? errorInvalidText,
  17. String? fieldHintText,
  18. String? fieldLabelText,
})

Shows a dialog containing a Material Design date picker.

Equivalent to material.showDatePicker.

Implementation

Future<DateTime?> showDP({
  required DateTime initialDate,
  required DateTime firstDate,
  required DateTime lastDate,
  material.DatePickerEntryMode initialEntryMode =
      material.DatePickerEntryMode.calendar,
  material.SelectableDayPredicate? selectableDayPredicate,
  String? helpText,
  String? cancelText,
  String? confirmText,
  material.Locale? locale,
  bool useRootNavigator = true,
  material.RouteSettings? routeSettings,
  material.TextDirection? textDirection,
  material.TransitionBuilder? builder,
  material.DatePickerMode initialDatePickerMode = material.DatePickerMode.day,
  String? errorFormatText,
  String? errorInvalidText,
  String? fieldHintText,
  String? fieldLabelText,
}) {
  return material.showDatePicker(
    context: this,
    initialDate: initialDate,
    firstDate: firstDate,
    lastDate: lastDate,
    initialEntryMode: initialEntryMode,
    selectableDayPredicate: selectableDayPredicate,
    helpText: helpText,
    cancelText: cancelText,
    confirmText: confirmText,
    locale: locale,
    useRootNavigator: useRootNavigator,
    routeSettings: routeSettings,
    textDirection: textDirection,
    builder: builder,
    initialDatePickerMode: initialDatePickerMode,
    errorFormatText: errorFormatText,
    errorInvalidText: errorInvalidText,
    fieldHintText: fieldHintText,
    fieldLabelText: fieldLabelText,
  );
}