showSBBModalPopup<T> function

Future<T?> showSBBModalPopup<T>({
  1. required BuildContext context,
  2. required String title,
  3. required Widget child,
  4. Clip clipBehavior = Clip.none,
  5. bool showCloseButton = true,
  6. Color? backgroundColor,
})

Shows a SBB Modal Popup. Use according to documentation.

If you try to close the popup but the underlying page is navigated back instead, try using the rootNavigator parameter of the Navigator:

Navigator.of(context, rootNavigator: true).pop(result)

See also:

Implementation

Future<T?> showSBBModalPopup<T>({
  required BuildContext context,
  required String title,
  required Widget child,
  Clip clipBehavior = Clip.none,
  bool showCloseButton = true,
  Color? backgroundColor,
}) {
  return showDialog<T>(
    context: context,
    builder: (BuildContext context) {
      return SBBModalPopup(
        title: title,
        clipBehavior: clipBehavior,
        showCloseButton: showCloseButton,
        backgroundColor: backgroundColor,
        child: child,
      );
    },
    barrierColor: SBBInternal.barrierColor,
  );
}