title: AlertDialog setstate in Function/OnTap
body: <p>new to flutter. I know how to set state the alert dialog, but with the need of tap to function like ()=> _createPlayer, It does not want to rebuild the alert dialog.
  I wonder how to set state on alert dialog when you need to tap them.</p>
  
  <pre><code> File _image;
  
      GestureDetector(
                  onTap: () =&gt; _createPlayer(),
  </code></pre>
  
  <p>After tap, it will display an alert dialog like this:</p>
  
  <pre><code>_createPlayer() {
      return showDialog(
          context: context,
          builder: (BuildContext context) {
            return AlertDialog(
              shape: RoundedRectangleBorder(
                  borderRadius: BorderRadius.all(Radius.circular(32.0))),
              content: Container(
                height: 400,
                width: 300,
                child: Column(
                  children: &lt;Widget&gt;[
                    Text('Create Player', style: Theme
                        .of(context)
                        .textTheme
                        .body1),
                    GestureDetector(
                      onTap: _getImageCamera,
                      child: CircleAvatar(
                        radius: 100,
                        backgroundColor: Colors.white,
                        backgroundImage: _image != null ? FileImage(_image) : AssetImage('assets/images/undercover.png'),
                      ),
                    ),
                  ],
                ),
              ),
            );
          });
    }
  
  _getImageCamera() async{
      var image = await ImagePicker.pickImage(source: ImageSource.camera);
  
      setState(() {
        _image = image;
      });
    }
  </code></pre>
  
  <p>I want to set state/change the image in alert dialog when selected. Any idea?</p>