首页 > 解决方案 > 颤振中的showDialog在iOS的发布版本中不起作用

问题描述

我正在使用 Flutter 为 iOS 创建一个应用程序。对于该应用程序,我在一个屏幕中使用对话。对于该对话,它在 iOS 的发布版本中显示一个灰色层,但它在模拟器或调试版本中按预期工作。对话上有一个灰色层我已将我的代码添加给面临相同问题的任何人?需要帮忙。

 static dynamic customPage(BuildContext context) {
    return showDialog(
      context: context,
      barrierDismissible: false,
      builder: (context) {
        return CustomDialog(
          insetPadding: const EdgeInsets.all(20),
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.all(Radius.circular(8)),
          ),
          child: Container(
            child: Stack(
              children: [
                Positioned(
                  child: Padding(
                    padding: const EdgeInsets.all(8.0),
                    child: Positioned(
                      right: 0.0,
                      child: GestureDetector(
                        onTap: () {
                          if (Navigator.canPop(context))
                            Navigator.pop(context, true);
                        },
                        child: Container(
                          color: Colors.transparent,
                          child: Icon(
                            Icons.close,
                            color: Colors.black,
                            size: 25,
                          ),
                        ),
                      ),
                    ),
                  ),
                  right: 1.0,
                ),
                Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: [
                    Image.asset(
                      "images/bind_loader.gif",
                      height: 90.0,
                      width: 90.0,
                    ),
                  ],
                ),
                Padding(
                  padding: const EdgeInsets.only(top: 80.0),
                  child: Row(
                    mainAxisAlignment: MainAxisAlignment.center,
                    children: [
                      CustomDialougeUtil(),
                    ],
                  ),
                ),
                Padding(
                  padding: const EdgeInsets.only(
                      right: 12.0, bottom: 10.0, top: 120),
                  child: Text(
                    "Please wait while we are confirming your payment",
                    style: bindTheme.textTheme.headline3,
                    textAlign: TextAlign.center,
                  ),
                ),
              ],
            ),
          ),
        );
      },
    );
  }
// this is a Widget that is showDialog
class _CustomDialougeUtilState extends State<CustomDialougeUtil> {
  //State full widget that uses normal timer view to display on dialogue
}

标签: flutter

解决方案


推荐阅读