leanflutter / window_manager

This plugin allows Flutter desktop apps to resizing and repositioning the window.
https://pub.dev/packages/window_manager
MIT License
701 stars 193 forks source link

[Windows] Calling destroy() method is crashing the app and app is not responding anymore. #452

Open KristijanMitrik opened 5 months ago

KristijanMitrik commented 5 months ago

Expected result : app gets closed immediately after calling destroy method

Arley011 commented 2 months ago

I also face this issue on version 0.3.9. And it happens in release build only, which is even more strange...

kibsoft commented 2 weeks ago

For those looking for a solution, a workaround can be found here: https://github.com/leanflutter/window_manager/issues/478#issuecomment-2312763103

In my case, I simply added exit(0) when closing the app from the tray icon menu: windowManager.destroy().then((_) => exit(0));