showModalBottomSheet<T> static method

Future<T?> showModalBottomSheet<T>({
  1. required WidgetBuilder builder,
  2. Color? backgroundColor,
  3. double? elevation,
  4. ShapeBorder? shape,
  5. Clip? clipBehavior,
  6. BoxConstraints? constraints,
  7. Color? barrierColor,
  8. bool isScrollControlled = false,
  9. bool useRootNavigator = false,
  10. bool isDismissible = true,
  11. bool enableDrag = true,
  12. RouteSettings? routeSettings,
  13. AnimationController? transitionAnimationController,
})

Show a bottom sheet Show a modal bottom sheet

Implementation

//! Requires a scaffold context
// static PersistentBottomSheetController<T> showBottomSheet<T>({
//   required WidgetBuilder builder,
//   Color? backgroundColor,
//   double? elevation,
//   ShapeBorder? shape,
//   Clip? clipBehavior,
//   BoxConstraints? constraints,
//   AnimationController? transitionAnimationController,
// }) {
//   _checkInit();
//   return material.showBottomSheet(
//     context: _navigatorKey.currentContext!,
//     builder: builder,
//     backgroundColor: backgroundColor,
//     elevation: elevation,
//     shape: shape,
//     clipBehavior: clipBehavior,
//     constraints: constraints,
//     transitionAnimationController: transitionAnimationController,
//   );
// }

/// Show a modal bottom sheet
static Future<T?> showModalBottomSheet<T>({
  required WidgetBuilder builder,
  Color? backgroundColor,
  double? elevation,
  ShapeBorder? shape,
  Clip? clipBehavior,
  BoxConstraints? constraints,
  Color? barrierColor,
  bool isScrollControlled = false,
  bool useRootNavigator = false,
  bool isDismissible = true,
  bool enableDrag = true,
  RouteSettings? routeSettings,
  AnimationController? transitionAnimationController,
}) {
  _checkInit();
  return material.showModalBottomSheet(
    context: _context,
    builder: builder,
    backgroundColor: backgroundColor,
    elevation: elevation,
    shape: shape,
    clipBehavior: clipBehavior,
    constraints: constraints,
    barrierColor: barrierColor,
    isScrollControlled: isScrollControlled,
    useRootNavigator: useRootNavigator,
    isDismissible: isDismissible,
    enableDrag: enableDrag,
    routeSettings: routeSettings,
    transitionAnimationController: transitionAnimationController,
  );
}