showBarModalBottomSheet<T> function

Future<T?> showBarModalBottomSheet<T>({
  1. required BuildContext context,
  2. required WidgetBuilder builder,
  3. Color? backgroundColor,
  4. double? elevation,
  5. ShapeBorder? shape,
  6. Clip? clipBehavior,
  7. Color barrierColor = Colors.black87,
  8. bool bounce = true,
  9. bool expand = false,
  10. AnimationController? secondAnimation,
  11. Curve? animationCurve,
  12. bool useRootNavigator = false,
  13. bool isDismissible = true,
  14. bool enableDrag = true,
  15. Widget? topControl,
  16. Duration? duration,
  17. RouteSettings? settings,
  18. SystemUiOverlayStyle? overlayStyle,
  19. double? closeProgressThreshold,
})

Implementation

Future<T?> showBarModalBottomSheet<T>({
  required BuildContext context,
  required WidgetBuilder builder,
  Color? backgroundColor,
  double? elevation,
  ShapeBorder? shape,
  Clip? clipBehavior,
  Color barrierColor = Colors.black87,
  bool bounce = true,
  bool expand = false,
  AnimationController? secondAnimation,
  Curve? animationCurve,
  bool useRootNavigator = false,
  bool isDismissible = true,
  bool enableDrag = true,
  Widget? topControl,
  Duration? duration,
  RouteSettings? settings,
  SystemUiOverlayStyle? overlayStyle,
  double? closeProgressThreshold,
}) async {
  assert(debugCheckHasMediaQuery(context));
  assert(debugCheckHasMaterialLocalizations(context));
  final result = await Navigator.of(context, rootNavigator: useRootNavigator)
      .push(ModalSheetRoute<T>(
    builder: builder,
    bounce: bounce,
    closeProgressThreshold: closeProgressThreshold,
    containerBuilder: (_, __, child) => BarBottomSheet(
      child: child,
      control: topControl,
      clipBehavior: clipBehavior,
      shape: shape,
      backgroundColor: backgroundColor,
      elevation: elevation,
      overlayStyle: overlayStyle,
    ),
    secondAnimationController: secondAnimation,
    expanded: expand,
    barrierLabel: MaterialLocalizations.of(context).modalBarrierDismissLabel,
    isDismissible: isDismissible,
    modalBarrierColor: barrierColor,
    enableDrag: enableDrag,
    animationCurve: animationCurve,
    duration: duration,
    settings: settings,
  ));
  return result;
}