iOS Flutter MethodChannel 双向通信

iOS Flutter MethodChannel 双向通信

💡 原文中文,约2000字,阅读约需5分钟。
📝

内容提要

Flutter的MethodChannel可以实现Flutter和Native App之间的双向通信,本文以Flutter默认创建的脚手架工程为例,介绍了MethodChannel的使用,Flutter端和Native端都需要构建MethodChannel,并且保证MethodChannel的name一致,FlutterViewController的binaryMessenger也需要传入。运行后可以看到通信日志。Flutter和Native App之间的双向通信可以通过MethodChannel实现。

🏷️

标签

➡️

继续阅读