mirror of
https://github.com/StarCitizenToolBox/app.git
synced 2026-01-14 04:00:27 +00:00
22 lines
623 B
Swift
22 lines
623 B
Swift
import Cocoa
|
|
import FlutterMacOS
|
|
import desktop_multi_window
|
|
|
|
class MainFlutterWindow: NSWindow {
|
|
override func awakeFromNib() {
|
|
let flutterViewController = FlutterViewController()
|
|
let windowFrame = self.frame
|
|
self.contentViewController = flutterViewController
|
|
self.setFrame(windowFrame, display: true)
|
|
|
|
RegisterGeneratedPlugins(registry: flutterViewController)
|
|
|
|
FlutterMultiWindowPlugin.setOnWindowCreatedCallback { controller in
|
|
// Register the plugin which you want access from other isolate.
|
|
RegisterGeneratedPlugins(registry: controller)
|
|
}
|
|
|
|
super.awakeFromNib()
|
|
}
|
|
}
|