diff --git a/flutter/lib/common.dart b/flutter/lib/common.dart index 48323d5fa..208c7f7c8 100644 --- a/flutter/lib/common.dart +++ b/flutter/lib/common.dart @@ -1699,7 +1699,10 @@ Future restoreWindowPosition(WindowType type, } if (lpos.isMaximized == true) { await restoreFrame(); - await wc.maximize(); + // An duration is needed to avoid the window being restored after maximized. + Future.delayed(Duration(milliseconds: 300), () async { + await wc.maximize(); + }); } else { await restoreFrame(); }