openCupertinoBottomSheet function

Future openCupertinoBottomSheet(
  1. BuildContext context,
  2. Widget content,
  3. CupertinoBottomSheetProps props
)

Implementation

Future openCupertinoBottomSheet(
    BuildContext context, Widget content, CupertinoBottomSheetProps props) {
  return showCupertinoModalPopup(
    context: context,
    anchorPoint: props.anchorPoint,
    useRootNavigator: props.useRootNavigator,
    barrierColor: props.barrierLabel,
    barrierDismissible: props.barrierDismissible,
    filter: props.filter,
    semanticsDismissible: props.semanticsDismissible,
    routeSettings: props.routeSettings,
    builder: (ctx) {
      return CustomSafeArea(
        props: props.safeAreaProps,
        child: CupertinoPopupSurface(
          isSurfacePainted: props.isSurfacePainted,
          child: Container(
            margin:
                EdgeInsets.only(bottom: MediaQuery.of(ctx).viewInsets.bottom),
            child: content,
          ),
        ),
      );
    },
  );
}