📜  颤振中的弹出警报 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:01:14.796000             🧑  作者: Mango

代码示例2
showPopUp(context){
    showDialog(
      context: context,
      builder: (BuildContext context) => AlertDialog(
        title: const Text('AlertDialog Title'),
        content: const Text('AlertDialog description'),
        actions: [
          TextButton(
            onPressed: () => Navigator.pop(context, 'Cancel'),
            child: const Text('Cancel'),
          ),
          TextButton(
            onPressed: () => Navigator.pop(context, 'OK'),
            child: const Text('OK'),
          ),
        ],
      ),
    );
  }