showCModalBottomSheet<T> function
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 isDismissible = true,
- bool enableDrag = true,
- bool? showDragHandle,
- bool useSafeArea = false,
- RouteSettings? routeSettings,
- AnimationController? transitionAnimationController,
- 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);
}