title: Dismissing a Cupertino dialogue action Flutter
body: <p>While dismissing a presented Cupertino alert dialogue action using the explained method my entire screen gets popped of and the alert dialogue stays on the screen. This is my code.</p>
  
  <pre><code>if (deviceList.isEmpty){
  
        var alert = new CupertinoAlertDialog(
          title: new Text("Alert"),
          content: new Text("There was an error signing in. Please try again."),
          actions: &lt;Widget&gt;[
            new CupertinoDialogAction(
                child: const Text('Discard'),
                isDestructiveAction: true,
                onPressed: () { Navigator.pop(context, 'Discard'); }
            ),
            new CupertinoDialogAction(
                child: const Text('Cancel'),
                isDefaultAction: true,
                onPressed: () { Navigator.pop(context, 'Cancel'); }
            ),
          ],
        );
        showDialog(context: context, child: alert);
      }
  </code></pre>
  
  <p>Is there anything wrong in what I am doing? I cant find any other solution to dismiss the alert dialogue. Please help.</p>