mirror of
https://github.com/flutter/samples.git
synced 2025-11-09 14:28:51 +00:00
Adds new flutter module, reconfigures Android/iOS sample (#144)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// Copyright 2019 The Flutter team. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import UIKit
|
||||
import Flutter
|
||||
|
||||
class ViewController: UIViewController {
|
||||
@IBAction func buttonWasTapped(_ sender: Any) {
|
||||
let flutterEngine = (UIApplication.shared.delegate as? AppDelegate)?.flutterEngine
|
||||
let flutterViewController = FlutterViewController(engine: flutterEngine, nibName: nil, bundle: nil)!
|
||||
self.present(flutterViewController, animated: false, completion: nil)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user