IsolateTransformerImpl class

Implemented types

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

killAll() Future<void>
kill会停止执行中的所有异步工作, 但IsolateTransformer对象本身不会失效, kill之后还是可以使用transform开启新的异步工作,
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
transform<S, T>(Stream<S> data, Stream<T> mapper(Stream<S> e), {String workerName = ''}) Stream<T>
异步执行Stream转换, mapper 在异步执行的方法,最好是顶层函数,否则可能因传入了无法序列化的对象导致失败,好在这种情况不论该对象是否有被使用都会崩溃, workerName 要支持web端真异步必须指定一个worker独立js文件在其中调用了传入的mapper, 参考/worker/worker.dart,js文件名'worker.js'对应参数workerName就是'worker',
override

Operators

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