Flutter:Dialog弹窗设置点击空白处不关闭弹窗

   showDialog(context: context,
      barrierDismissible: false,//设置为false,点击空白处弹窗不关闭
      builder: (context){
        return new AlertDialog(
          content: Text('msg'),
          actions: <Widget>[
            new TextButton(
              child: new Text('确定'),
              onPressed: () {
                Navigator.of(context).pop();
              },
            ),
          ],
        );
      },
    );
THE END
喜欢就支持一下吧
点赞9赞赏 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容