在 Flutter 中,Platform Channel 是如何工作的?它与 React Native 的 Bridge 有何异同?
考察说明
考察对 Flutter 跨端通信机制及其与 RN 差异的理解
回答思路
- 描述 Platform Channel 的三类通道(MethodChannel、EventChannel、BasicMessageChannel)
- 说明消息编码方式(StandardMessageCodec)
- 对比 Flutter 与 React Native 通信机制的核心差异(如线程模型、数据编码)
- 指出 Flutter 在性能上的优势及原因