-
-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
windowManager.destroy() takes several seconds to complete with Flutter 3.24.0 #478
Comments
I've encountered the same issue. The |
Same issue! |
Unfortunately no. |
The Flutter version has been rolled back to 3.22.3, and window_manager has also been downgraded to 0.3.9 because of issue 483. |
@azlekov I encoutered the same problem. For the moment, I added So, like that the function @override
void onWindowClose() async {
bool isPreventClose = await windowManager.isPreventClose();
if (isPreventClose) {
// ... disposing all my componenents, upgrade prefs, etc.
// Close app
await windowManager.destroy();
exit(0);
}
} |
Rolling back Flutter to 3.22.3 and window_manager to 0.3.9 fixes the issue on development runs but the issue still persists for release builds. I also added the |
I had the same problem. The dll |
Thank you. I did try a |
#502 I have tried this and it works well for me. @override
Future onWindowClose() async {
final bool isPreventClose = await windowManager.isPreventClose();
if (!isPreventClose) return;
if (!mounted) return;
final result = await showAskExitDialog(context);
if (result == null || !result) return;
await windowManager.setPreventClose(false);
await windowManager.close();
} |
We use windowManager.destroy() in our application to shut down. This worked smoothly in the past and now with the upgrade to Flutter 3.24.0 it takes several seconds to complete and to finally shutdown the application.
Tested on Windows.
The text was updated successfully, but these errors were encountered: