How run code after showDialog is dismissed in Flutter?

前端 未结 7 1448
心在旅途
心在旅途 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:40

    Simply use await and then, the code in "then" block will run after the dialog is dismissed

    await showDialog(
           //Your Dialog Code
    ).then((val){
        Navigator.pop(_context);
    });
    
    0 讨论(0)
提交回复
热议问题