How to dismiss an AlertDialog on a FlatButton click?

前端 未结 16 1372
轮回少年
轮回少年 2021-02-03 16:44

I have the following AlertDialog.

showDialog(
            context: context,
            child: new AlertDialog(
              title: const Text(\"Lo         


        
16条回答
  •  一个人的身影
    2021-02-03 17:04

    Navigator.pop() should do the trick. You can also use that to return the result of the dialog (if it presented the user with choices)

提交回复
热议问题