MethodChannelPlatformBridge class

一个使用方法通道(MethodChannel)实现 PlatformBridgePlatform 的实现类

提供了Flutter与原生平台之间的双向通信功能

Inheritance

Constructors

MethodChannelPlatformBridge()
构造函数,初始化方法通道并设置监听器

Properties

hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
与原生平台交互所使用的方法通道
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
销毁资源,取消订阅
getPlatformVersion() Future<String?>
获取平台版本信息
override
listenFromNative(String name, dynamic callback(dynamic data)) → void
监听来自原生平台的数据
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendToNative(String name, dynamic data) Future<void>
发送数据到原生平台
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited