transform_in_isolate 0.1.3

Dart native
Flutter Android iOS

Simple helper to run stream transformation through newly spawned isolate.

transform_in_isolate #

Run stream transformer in isolate.

New isolate is spawned when stream.transform() is called, and closes when either input stream completes or output subscription is cancelled.

API:

TransformInIsolate(StreamTransformer<S, T>) -> StreamTransformer<S, T>

Example:

Stream.fromIterable([1, 2, 3])
      .transform(TransformInIsolate(MyTransform()))
      .listen(print);

class MyTransform extends StreamTransformerBase {
    bind(s) => s.map((val) => val * 2)  // this code will run in isolate
}
0
likes
90
pub points
0%
popularity

Simple helper to run stream transformation through newly spawned isolate.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

skyjur@gmail.com

License

BSD (LICENSE)

More

Packages that depend on transform_in_isolate