Closed lucasjinreal closed 1 year ago
If you mean the MainFlutterWindow.swift
file, it needs to look like this:
import Cocoa
import FlutterMacOS
import macos_window_utils
class MainFlutterWindow: NSWindow {
override func awakeFromNib() {
let windowFrame = self.frame
let macOSWindowUtilsViewController = MacOSWindowUtilsViewController()
self.contentViewController = macOSWindowUtilsViewController
self.setFrame(windowFrame, display: true)
/* Initialize the macos_window_utils plugin */
MainFlutterWindowManipulator.start(mainFlutterWindow: self)
RegisterGeneratedPlugins(registry: macOSWindowUtilsViewController.flutterViewController)
super.awakeFromNib()
}
}
Got this when running old code.
Here is the setup in main.swift: