showBoardDateTimePickerForDate function

Future<DateTime?> showBoardDateTimePickerForDate({
  1. required BuildContext context,
  2. BoardDateTimeController? controller,
  3. ValueNotifier<DateTime>? valueNotifier,
  4. void onResult(
    1. BoardDateResult
    )?,
  5. void onChanged(
    1. DateTime
    )?,
  6. DateTime? initialDate,
  7. DateTime? minimumDate,
  8. DateTime? maximumDate,
  9. BoardDateTimeOptions? options,
  10. Widget? headerWidget,
  11. double breakpoint = 800,
  12. double radius = 24,
  13. Color? barrierColor,
  14. RouteSettings? routeSettings,
  15. AnimationController? transitionAnimationController,
  16. bool useRootNavigator = false,
  17. bool isDismissible = true,
  18. bool enableDrag = true,
  19. bool? showDragHandle,
  20. bool useSafeArea = false,
  21. Widget onTopActionBuilder(
    1. BuildContext context
    )?,
  22. CloseButtonBuilder? customCloseButtonBuilder,
})

Show a Modal Picker for Date bottom sheet.

The context argument is used to look up the Navigator and Theme for the bottom sheet.

The valueNotifier is a parameter to detect changes and notify you immediately. If it is changed in the picker, it is set to value so that the caller will receive a change callback immediately. With or without specification, pressing the check button in the header will return the selected date.

The initialDate and minimumDate and maximumDate are parameters related to dates, respectively. Initial value, minimum date, and maximum date.

The options is an option to customize the picker display.

The breakpoint is the width that switches between wide and standard display. The radius is a rounded corner on both sides of the top in modal display.

barrierColor, routeSettings, transitionAnimationController, etc. are the parameters that are specified in the normal modal bottom sheet, so please check there for a description of the parameters.

Implementation

Future<DateTime?> showBoardDateTimePickerForDate({
  required BuildContext context,
  BoardDateTimeController? controller,
  ValueNotifier<DateTime>? valueNotifier,
  void Function(BoardDateResult)? onResult,
  void Function(DateTime)? onChanged,
  DateTime? initialDate,
  DateTime? minimumDate,
  DateTime? maximumDate,
  BoardDateTimeOptions? options,
  Widget? headerWidget,
  double breakpoint = 800,
  double radius = 24,
  Color? barrierColor,
  RouteSettings? routeSettings,
  AnimationController? transitionAnimationController,
  bool useRootNavigator = false,
  bool isDismissible = true,
  bool enableDrag = true,
  bool? showDragHandle,
  bool useSafeArea = false,
  Widget Function(BuildContext context)? onTopActionBuilder,
  CloseButtonBuilder? customCloseButtonBuilder,
}) async {
  return await showBoardDateTimePicker<BoardDateResult>(
      context: context,
      controller: controller,
      valueNotifier: valueNotifier,
      pickerType: DateTimePickerType.date,
      onChanged: onChanged,
      onResult: onResult,
      initialDate: initialDate,
      minimumDate: minimumDate,
      maximumDate: maximumDate,
      options: options,
      headerWidget: headerWidget,
      breakpoint: breakpoint,
      radius: radius,
      barrierColor: barrierColor,
      routeSettings: routeSettings,
      transitionAnimationController: transitionAnimationController,
      useRootNavigator: useRootNavigator,
      isDismissible: isDismissible,
      enableDrag: enableDrag,
      showDragHandle: showDragHandle,
      useSafeArea: useSafeArea,
      onTopActionBuilder: onTopActionBuilder,
      customCloseButtonBuilder: customCloseButtonBuilder);
}