macosui / macos_window_utils.dart

macos_window_utils is a Flutter package that provides a set of methods for modifying the NSWindow of a Flutter application on macOS.
https://pub.dev/packages/macos_window_utils
MIT License
49 stars 9 forks source link

Fix for issue #25: Do not create two FlutterViewControllers #26

Closed kacikgoez closed 1 year ago

kacikgoez commented 1 year ago

Issue: creating another instance of FlutterViewController in MacOSWindowUtilsViewController

Creating two instances of FlutterViewController does not allow the app to close in the newer Flutter versions and keeps the program open ( issue #25 ). Instead of initializing at class level, check whether a FVC is given first and then create one.

I cannot test the examples on 3.10 due to macos_ui currently not supporting 3.10 (which will soon be fixed from what is looks like). But I checked it in 3.7.12. I can run the fixed code on 3.10 using flutter_acrylic and it resolves the issue of not closing.