closeAllDialogs static method

void closeAllDialogs({
  1. DialogReturnTypeEnum? returnType,
})

关闭所有弹窗

Implementation

static void closeAllDialogs({DialogReturnTypeEnum? returnType}) {
  final keys = List<String>.from(_dialogContexts.keys);
  TCICLog.info(
    'Closing all dialogs, count: ${keys.length}',
    actionModule: ActionModule.tools.name,
    actionName: ActionName.showModalDailog.name,
  );

  for (final key in keys) {
    final contexts = _dialogContexts[key];
    if (contexts != null && contexts.isNotEmpty) {
      // 使用closeAll=true关闭该key的所有实例
      closeModalDailog(
        contexts.first,
        key,
        returnType: returnType,
        closeAll: true,
      );
    }
  }
}