How to update the Homepage just after the showDialog()
is dismissed/disposed? Doesn\'t seem like it has an onDispose()
function.
Found another
Noticed a couple of the above answers were a bit out of date due to the "child" construct used with the AlertDialog object being deprecated now.
Here is what I use now instead for a blocking alert dialog:
showDialog(
context: context,
builder: (BuildContext context) {
// return object of type Dialog
return AlertDialog(
title: new Text("Conversation Request"),
content:
new Text("Have a conversation with this person"),
actions: [
// usually buttons at the bottom of the dialog
new FlatButton(
child: new Text("Accept"),
onPressed: () {
performAccept();
},
),
new FlatButton(
child: new Text("Ignore"),
onPressed: () {
performIgnore();
},
)
],
);
},
)