File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,6 @@ class ExampleWindow: NSWindow {
24
24
25
25
RegisterGeneratedPlugins ( registry: flutterViewController)
26
26
27
- flutterViewController. launchEngine ( with: nil )
28
-
29
27
super. awakeFromNib ( )
30
28
}
31
29
}
Original file line number Diff line number Diff line change @@ -17,20 +17,19 @@ import FlutterMacOS
17
17
18
18
class FlutterWindow : NSWindow {
19
19
override func awakeFromNib( ) {
20
- let flutterViewController = FLEViewController . init ( )
21
- let windowFrame = self . frame
22
- self . contentViewController = flutterViewController
23
- self . setFrame ( windowFrame, display: true )
24
-
25
- RegisterGeneratedPlugins ( registry: flutterViewController)
26
-
27
20
let project = FLEDartProject . init ( )
28
21
var arguments : [ String ] = [ ] ;
29
22
#if !DEBUG
30
23
arguments. append ( " --disable-dart-asserts " ) ;
31
24
#endif
32
25
project. engineSwitches = arguments
33
- flutterViewController. launchEngine ( with: project)
26
+
27
+ let flutterViewController = FLEViewController . init ( project: project)
28
+ let windowFrame = self . frame
29
+ self . contentViewController = flutterViewController
30
+ self . setFrame ( windowFrame, display: true )
31
+
32
+ RegisterGeneratedPlugins ( registry: flutterViewController)
34
33
35
34
super. awakeFromNib ( )
36
35
}
You can’t perform that action at this time.
0 commit comments