Unverified Commit 6931d5e3 authored by gaaclarke's avatar gaaclarke Committed by GitHub

Fixed usage of optional types in swift. (#43461)

parent e778686e
......@@ -4,7 +4,7 @@ import FlutterPluginRegistrant
class ViewController: UIViewController {
var flutterEngine : FlutterEngine?;
// Boiler-plate add-to-app demo. Not integration tested anywhere.
override func viewDidLoad() {
super.viewDidLoad()
......@@ -18,10 +18,11 @@ class ViewController: UIViewController {
}
@objc func handleButtonAction() {
let flutterEngine = self.flutterEngine;
GeneratedPluginRegistrant.register(with: flutterEngine);
if let flutterEngine = flutterEngine as? FlutterEngine {
GeneratedPluginRegistrant.register(with: flutterEngine);
let flutterViewController = FlutterViewController(engine: flutterEngine, nibName: nil, bundle: nil)!;
self.present(flutterViewController, animated: false, completion: nil)
let flutterViewController = FlutterViewController(engine: flutterEngine, nibName: nil, bundle: nil);
self.present(flutterViewController, animated: false, completion: nil)
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment