showCModalBottomSheet<T> function

Future<T?> showCModalBottomSheet<T>({
  1. required BuildContext context,
  2. required WidgetBuilder builder,
  3. Cancellable? cancellable,
  4. Color? backgroundColor,
  5. double? elevation,
  6. ShapeBorder? shape,
  7. Clip? clipBehavior,
  8. BoxConstraints? constraints,
  9. Color? barrierColor,
  10. bool isScrollControlled = false,
  11. bool useRootNavigator = false,
  12. bool isDismissible = true,
  13. bool enableDrag = true,
  14. bool? showDragHandle,
  15. bool useSafeArea = false,
  16. RouteSettings? routeSettings,
  17. AnimationController? transitionAnimationController,
  18. Offset? anchorPoint,
})

Implementation

Future<T?> showCModalBottomSheet<T>({
  required BuildContext context,
  required WidgetBuilder builder,
  Cancellable? cancellable,
  Color? backgroundColor,
  double? elevation,
  ShapeBorder? shape,
  Clip? clipBehavior,
  BoxConstraints? constraints,
  Color? barrierColor,
  bool isScrollControlled = false,
  bool useRootNavigator = false,
  bool isDismissible = true,
  bool enableDrag = true,
  bool? showDragHandle,
  bool useSafeArea = false,
  RouteSettings? routeSettings,
  AnimationController? transitionAnimationController,
  Offset? anchorPoint,
}) {
  assert(debugCheckHasMediaQuery(context));
  assert(debugCheckHasMaterialLocalizations(context));
  final NavigatorState navigator =
      Navigator.of(context, rootNavigator: useRootNavigator);
  // final MaterialLocalizations localizations = MaterialLocalizations.of(context);

  final route = ModalBottomSheetRoute<T>(
    builder: builder,
    capturedThemes:
        InheritedTheme.capture(from: context, to: navigator.context),
    isScrollControlled: isScrollControlled,
    // barrierLabel: localizations.scrimLabel,
    // barrierOnTapHint:
    //     localizations.scrimOnTapHint(localizations.bottomSheetLabel),
    backgroundColor: backgroundColor,
    elevation: elevation,
    shape: shape,
    clipBehavior: clipBehavior,
    constraints: constraints,
    isDismissible: isDismissible,
    modalBarrierColor:
        barrierColor ?? Theme.of(context).bottomSheetTheme.modalBarrierColor,
    enableDrag: enableDrag,
    // showDragHandle: showDragHandle,
    settings: routeSettings,
    transitionAnimationController: transitionAnimationController,
    anchorPoint: anchorPoint,
    useSafeArea: useSafeArea,
  );
  return navigator.pushCancellableRoute(route, cancellable);
}