FgAsync class

提供 Flutter 和 Go 之间的异步通信功能

包含在 Dart 隔离区执行代码和与 Go 代码通信的方法

Constructors

FgAsync()

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

dart<P, R>(R computation(P params), P params) Future<R>
在 Dart 隔离区中执行计算
go<P, R>(void computation(P params, int portId), P params, [int? customPortId]) Future<Pointer<Void>>
执行 Go 代码并等待结果
sendGoResult(int portId, Pointer<Void> result) bool
发送 Go 函数结果到 Dart