showZeroModalBottomSheet<T> function

Future<T?> showZeroModalBottomSheet<T>(
  1. BuildContext context, {
  2. required WidgetBuilder builder,
  3. ZeroBottomSheetStyle? style,
  4. Widget? handleBar,
  5. bool isScrollControlled = false,
  6. bool useRootNavigator = false,
  7. bool isDismissible = true,
  8. bool enableDrag = true,
  9. bool useSafeArea = false,
})

Implementation

Future<T?> showZeroModalBottomSheet<T>(
  BuildContext context, {
  required WidgetBuilder builder,
  ZeroBottomSheetStyle? style,
  Widget? handleBar,
  bool isScrollControlled = false,
  bool useRootNavigator = false,
  bool isDismissible = true,
  bool enableDrag = true,
  bool useSafeArea = false,
}) async {
  final adaptiveStyle = context.theme.bottomSheetStyle.merge(style);

  return showModalBottomSheet(
    context: context,
    barrierColor: adaptiveStyle.barierColor,
    enableDrag: enableDrag,
    isDismissible: isDismissible,
    useRootNavigator: useRootNavigator,
    useSafeArea: useSafeArea,
    isScrollControlled: isScrollControlled,
    backgroundColor: adaptiveStyle.backgroundColor,
    elevation: adaptiveStyle.elevation,
    shape: RoundedRectangleBorder(
      borderRadius: adaptiveStyle.borderRadius ?? BorderRadius.zero,
    ),
    builder: (context) {
      return _BottomSheetContent(
        style: adaptiveStyle,
        content: builder(context),
        handleBar: handleBar,
      );
    },
  );
}