opt: add preventClose to handle close event manually

This commit is contained in:
Kingtous
2022-11-06 17:39:19 +08:00
parent ddeaf7fb92
commit 0b167493cc
5 changed files with 28 additions and 13 deletions

View File

@@ -140,6 +140,8 @@ void runMultiWindow(
String title,
) async {
await initEnv(appType);
// set prevent close to true, we handle close event manually
WindowController.fromWindowId(windowId!).setPreventClose(true);
late Widget widget;
switch (appType) {
case kAppTypeDesktopRemote: