Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在iOS18系统中,使用SmartDialog.show方法会导致WebViewWidget点击事件失效 #249

Open
chengshixin opened this issue Feb 8, 2025 · 1 comment

Comments

@chengshixin
Copy link

chengshixin commented Feb 8, 2025

flutter_smart_dialog: ^4.9.8+5
webview_flutter: ^4.7.0

  //跳转设置
  openLocationSettings(String message) {
    //SmartDialog 自定义弹框有 Bug 会影响 WebViewWidget的点击事件 iOS18系统上出现
    //WebViewWidget可滑动 但点击事件失效

    SmartDialog.show(
        clickMaskDismiss: false,
        builder: (_) {
          return CommonDialog(message, (confirm) {
            if (confirm) {
              AppSettings.openAppSettings();
            }
          });
        });

    //使用系统自带的Dialog不会影响
    //systemShowCupertinoDialog(Get.context!);
  }
  // 弹出 Cupertino 风格对话框的方法
  void systemShowCupertinoDialog(BuildContext context) {
    showCupertinoDialog(
      context: context,
      builder: (BuildContext context) {
        return CupertinoAlertDialog(
          title: Text("提示"),
          content: Text("这是一个 iOS 风格的对话框"),
          actions: <Widget>[
            CupertinoDialogAction(
              onPressed: () {
                Navigator.of(context).pop(); // 关闭对话框
              },
              child: Text("确定"),
            ),
            CupertinoDialogAction(
              onPressed: () {
                Navigator.of(context).pop(); // 关闭对话框
              },
              child: Text("取消"),
            ),
          ],
        );
      },
    );
  }
@xdd666t
Copy link
Member

xdd666t commented Feb 8, 2025

这种场景把useSystem设置为true, 如果不行的话, 就是使用系统弹窗替代吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants