How run code after showDialog is dismissed in Flutter?

前端 未结 7 1452
心在旅途
心在旅途 2021-02-05 01:11

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

Found another

7条回答
  •  旧巷少年郎
    2021-02-05 01:22

    If you have made another StatefulWidget for your DialogBox and onDissmissed, you want to call some function in the "dialog calling widget". You can this snippet.

    await showDialog(
          context: context,
          builder: (_) => MenuBox(),
    );
    print("now closed");
    

提交回复
热议问题