Question: How to update the Homepage just after the `showDialog()` is dismissed/disposed? Doesn't seem like it has an `onDispose()` function.

Found another possible Answer : The `WillPopScope` can help detect if the back button is pressed.

The widget that will be used in the `showDialog`, in its build function the widget can be wrapped in `return new WillPopScope(child: ______, onWillPop: _______);` The code can be run in the `onWillPop` function. This can update the Homepage below.

Answer: 
Simply use `await` or `then`. the code in `then` block will be run after the dialog is dismissed.

```
showDialog(
  // Your Dialog Code
).then((val){
  Navigator.pop(_context);
});

```
you can use this code below. It will invoke onDismiss and onShow dialog.

```
   void baseDialog(
        {required Widget content,
        required BuildContext context,
        required Function onDialogShow,
        required Function onDialogDismiss,
        bool barrierDismissible = true}) async {
      onDialogShow.call();

      await showDialog(
        context: context,
        barrierDismissible: barrierDismissible,
        builder: (_) {
          return AlertDialog(
            shape: const RoundedRectangleBorder(
              borderRadius: BorderRadius.all(
                Radius.circular(12),
              ),
            ),
            content: Material(color: Colors.white, child: content),
          );
        },
      );
      onDialogDismiss.call();
    }

```