Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove launch call on FLEViewController (#454)
Updates macOS Runners for
flutter/engine#9750

Projects are now configured via init, and there is no explicit launch
command on a view controller.
  • Loading branch information
stuartmorgan committed Jul 11, 2019
1 parent 6433c0b commit 03d6f06
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 0 additions & 2 deletions example/macos/ExampleWindow.swift
Expand Up @@ -24,8 +24,6 @@ class ExampleWindow: NSWindow {

RegisterGeneratedPlugins(registry: flutterViewController)

flutterViewController.launchEngine(with: nil)

super.awakeFromNib()
}
}
Expand Down
15 changes: 7 additions & 8 deletions testbed/macos/FlutterWindow.swift
Expand Up @@ -17,20 +17,19 @@ import FlutterMacOS

class FlutterWindow: NSWindow {
override func awakeFromNib() {
let flutterViewController = FLEViewController.init()
let windowFrame = self.frame
self.contentViewController = flutterViewController
self.setFrame(windowFrame, display: true)

RegisterGeneratedPlugins(registry: flutterViewController)

let project = FLEDartProject.init()
var arguments: [String] = [];
#if !DEBUG
arguments.append("--disable-dart-asserts");
#endif
project.engineSwitches = arguments
flutterViewController.launchEngine(with: project)

let flutterViewController = FLEViewController.init(project: project)
let windowFrame = self.frame
self.contentViewController = flutterViewController
self.setFrame(windowFrame, display: true)

RegisterGeneratedPlugins(registry: flutterViewController)

super.awakeFromNib()
}
Expand Down

0 comments on commit 03d6f06

Please sign in to comment.