-
-
Save yaizudamashii/1121ed7e6fc2e28aff845b8adebae06a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Flutter | |
import FlutterPluginRegistrant | |
@UIApplicationMain | |
class AppDelegate: FlutterAppDelegate { | |
// other AppDelegate properties | |
// create multiple Flutter Engines | |
lazy var passcodeFlutterEngine = FlutterEngine(name: "my flutter engine") | |
lazy var informationTabFlutterEngine = FlutterEngine(name: "my flutter engine 2") | |
lazy var qrcodeFlutterEngine = FlutterEngine(name: "my flutter engine 3") | |
override func application(_ application: UIApplication, | |
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | |
flutterEngine.run() | |
informationTabFlutterEngine.run() | |
qrcodeFlutterEngine.run() | |
// other app initializations | |
// need to register all packages used in Flutter with each instance of FlutterEngine | |
GeneratedPluginRegistrant.register(with: self.flutterEngine) | |
GeneratedPluginRegistrant.register(with: self.informationTabFlutterEngine) | |
GeneratedPluginRegistrant.register(with: self.qrcodeFlutterEngine) | |
return super.application(application, didFinishLaunchingWithOptions: launchOptions) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment