PlatformBridgePlatform class abstract
平台桥接插件的抽象接口
定义了Flutter与原生平台之间双向通信所需的方法 具体的平台实现(如Android、iOS)应继承此类并实现相应方法
- Inheritance
-
- Object
- PlatformInterface
- PlatformBridgePlatform
- Implementers
Constructors
- PlatformBridgePlatform()
- 构造函数
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getPlatformVersion(
) → Future< String?> - 获取平台版本
-
listenFromNative(
String name, dynamic callback(dynamic data)) → void - 监听来自原生平台的数据
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendToNative(
String name, dynamic data) → Future< void> - 发送数据到原生平台
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ PlatformBridgePlatform
-
获取默认的 PlatformBridgePlatform 实例
getter/setter pair