title: How to get AlertDialog Callback from method in Flutter?
body: <p>I have <code>AlertDialog</code> in static method, in that I wants to get callback when user clicks on <code>OK</code> button.</p>
  
  <p>I tried using <code>typedef</code> but can't understand.</p>
  
  <p>Below is My Code:</p>
  
  <pre><code>class DialogUtils{
  
    static void displayDialogOKCallBack(BuildContext context, String title,
        String message)
    {
      showDialog(
        context: context,
        builder: (BuildContext context) {
           return AlertDialog(
            title: new Text(title, style: normalPrimaryStyle,),
            content: new Text(message),
            actions: &lt;Widget&gt;[
              new FlatButton(
                child: new Text(LocaleUtils.getString(context, "ok"), style: normalPrimaryStyle,),
                onPressed: () {
                  Navigator.of(context).pop();
                  // HERE I WANTS TO ADD CALLBACK
                },
              ),
            ],
          );
        },
      );
    }
  }
  </code></pre>