title: How to close the SimpleDialog in flutter after choosing an option
body: <p>I added a <code>SimpleDialog</code> with 2 options: lost and found. Whenever I make my selection and get redirected to where I want, <a href="https://i.stack.imgur.com/zNVpz.png" rel="nofollow noreferrer">the SimpleDialog doesn't close and stays on my screen.</a></p>
  
  <p>The switch:</p>
  
  <pre><code>switch (
    await showDialog(
      context: context,
      child: new SimpleDialog(
        title: new Text("Which category?"),
        children: &lt;Widget&gt;[
          new SimpleDialogOption(child: new Text("Found"),
            onPressed: () {
              goToCreate();
            },
          ),
          new SimpleDialogOption(child: new Text("Lost"),
            onPressed: () {
              //Whatever
            },
          ),
        ],
      )
    )
  )
  </code></pre>
  
  <p>And the cases:</p>
  
  <pre><code>{
    case "Found":
      goToCreate();
      break;
    case "Lost":
      //Whatever
      break;
  }
  </code></pre>