MainFlutterWindow.swift 388 B

123456789101112131415
  1. import Cocoa
  2. import FlutterMacOS
  3. class MainFlutterWindow: NSWindow {
  4. override func awakeFromNib() {
  5. let flutterViewController = FlutterViewController()
  6. let windowFrame = self.frame
  7. self.contentViewController = flutterViewController
  8. self.setFrame(windowFrame, display: true)
  9. RegisterGeneratedPlugins(registry: flutterViewController)
  10. super.awakeFromNib()
  11. }
  12. }