为什么Dialog不能立即扑灭?

问题描述

对话框不会在用Navigator.of(context).pop(true)按下是按钮时立即关闭,它等待完成循环执行,在发布完整的数据对话框后,我需要在按钮关闭时立即关闭按下想要然后要显示圆形条,如何解决这个问题,请帮忙,谢谢

def remove_same(s1,s2):
    l1 = list(s1)
    l2 = list(s2)
    out1 = []
    out2 = []
    for c1,c2 in zip(l1,l2):
        if c1 != c2:
            out1.append(c1)
            out2.append(c2)
            
    s1_out = "".join(out1)
    s2_out = "".join(out2)
    
    print(s1_out)
    print(s2_out)

解决方法

您可以执行以下操作,而不是像return AlertDialog(...).then(...)那样进行链接:

bool process = await AlterDialog(..);
if (process) {
   // Show Circular progress indicator
   // perform calculation
   // pop out circular progress indicator
}

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...