title: Can't dismiss dialog
body: <p>I'm using <code>SimpleDialog</code> which has children <code>SimpleDialogOption</code>that can be uses to build a list in the dialog. My dialog is in a <code>FutureBuilder</code> so I need to wrap the dialog with <code>WidgetsBinding.instance.addPostFrameCallback((_)</code> . <code>SimpleDialogOption</code> has an <code>onPressed</code> callback where I can set the state. And this calls another rebuild which leaves the dialog open because of <code>WidgetsBinding.instance.addPostFrameCallback((_)</code> (I think!). If I don't call setState the dialog dismisses.  I'm unable to dismiss my dialog. Anyway around this...</p>
  
  <pre><code>FutureBuilder&lt;List&lt;Suburb&gt;&gt;(
              future: suburbs,
              builder: (context, snapshot) {
                switch (snapshot.connectionState) {
  
                  // when future has not finished
                  case ConnectionState.active:
                  case ConnectionState.waiting:
                    return CircularProgressIndicator();
  
                  // when future has finished
                  case ConnectionState.done:
                    final suburbs = snapshot.data;
                    if (suburbs == null) {
                      WidgetsBinding.instance.addPostFrameCallback((_) {
                        showAlertDialog(
                          context: context,
                          title: 'No postocde',
                          content: 'We can' '/t seem to find that postocode ',
                          defaultActionText: 'OK',
                        ).then((_) =&gt; _controller.clear());
                      });
                      return Container();
                    }
                    if (suburbs.length == 1) {
  
                    suburb = suburbs[0].name;
                          suburbCode = suburbs[0].code;
                     return(Text(suburbs[0].name));
  
                    } else if (suburbs.length == 2) {
  
                        showDialog(
                            context: context,
                            builder: (BuildContext context) {
                              return SimpleDialog(
                                backgroundColor: Colors.white,
                                title: Text('Pick'),
                                children: [
                                  SimpleDialogOption(
                                    child: Text(suburbs[0].name),
                                    onPressed: () {
                                      Navigator.of(context).pop();
                                      setState(() {
                                        WidgetsBinding.instance
                                            .cancelFrameCallbackWithId(1);
                                        suburb = suburbs[0].name;
                                      });
                                    },
                                  ),
                                  SimpleDialogOption(
                                    child: Text(suburbs[1].name),
                                    onPressed: () {
                                      Navigator.of(context).pop();
                                      setState(() {
                                        suburb = suburbs[0].name;
                                      });
                                    },
                                  )
                                ],
                              );
                            });
  
  
                      return Column(
                        children: [
                          FlatButton(
                            child: Text(suburbs[0].name),
                            onPressed: () {
                              setState(() {
                                suburb = suburbs[0].name;
                                suburbCode = suburbs[0].code;
                              });
                            },
                          ),
                          FlatButton(
                            child: Text(suburbs[1].name),
                            onPressed: () {
                              setState(() {
                                suburb = suburbs[1].name;
                                suburbCode = suburbs[1].code;
                              });
                            },
                          ),
                        ],
                      );
                    }
                    return Container();
  
                  // initial title
                  default:
                    return Container();
                }
              },
            ),
  </code></pre>