How to update the Homepage just after the showDialog() is dismissed/disposed? Doesn\'t seem like it has an onDispose() function.
showDialog()
onDispose()
Found another
There are two approaches.
Use async-await
async-await
bool shouldUpdate = await showDialog(...); if (shouldUpdate) { setState(() { // we should update the UI }); }
Use then
then
showDialog(...).then((shouldUpdate) { if (shouldUpdate) { setState(() { // we should update the UI }); } });