我在原生iOS代码中添加了flatter。我有一个UIButton,按下这个按钮,我展示了一个FlatterViewController。我一直在关注
this
.
以下是我展示FlightViewController的代码:
@objc
@IBAction func openProfile() {
print("open profile")
lazy var flutterEngine = FlutterEngine(name: "patient_profile_engine")
flutterEngine.run(withEntrypoint: "", libraryURI: "");
let profileVC =
FlutterViewController(engine: flutterEngine, nibName: nil, bundle: nil)
present(profileVC, animated: true, completion: nil)
}
这段代码运行良好,颤振视图正在打开,因为我还没有指定和入口点,所以它使用了main。飞奔
问题是我需要向颤振镖代码传递一些信息。e、 g.字典
["patient_id": "123456"]
初始化期间。
我也必须在Android原生Java代码中这样做。
有什么简单的方法吗?