isolate_contactor 1.1.0 copy "isolate_contactor: ^1.1.0" to clipboard
isolate_contactor: ^1.1.0 copied to clipboard

discontinuedreplaced by: isolate_manager
outdated

An easy way to create a new isolate and comunicate with it and support sending values between main and child isolate multiple times via `stream`. So you can build your `widget` with `StreamBuilder` an [...]

1.1.0 #

  • Remove flutter dependencies to support dart native

1.0.0 #

  • Support web platform with limited features. The package use Future to provide the same features to Isolate but it doesn't have pause, resume, restart methods. I'll try to bring the same action with Isolate as much as possible.
  • Support Future when creating build-in method. More information please read Readme.
  • BREAKING CHANGE:
    • Create your own isolate:

      Before:

      void isolateFunction(List<dynamic> params) {
        final channel = IsolateChannel.connectSend(params.last);
        channel.stream.listen((rawMessage) {
          final message = IsolateContactor.getMessage(rawMessage);
          if (message != null) {
            // Do more stuff here
      
            // Send the result to your [onMessage] stream
            channel.sendResult(add(message[0], message[1]));
          }
      }
      

      Now:

      void isolateFunction(dynamic params) {
        final channel = IsolateContactorController(params);
        channel.onIsolateMessage.listen((message) {
          // Do more stuff here
      
          // Send the result to your [onMessage] stream
          channel.sendResult(add(message[0], message[1]));
        });
      }
      

0.0.1+2 #

  • Update flutter version

0.0.1+1 #

  • Update description

0.0.1 #

  • Initial release
4
likes
0
pub points
57%
popularity

Publisher

verified publisherlamnhan.dev

An easy way to create a new isolate and comunicate with it and support sending values between main and child isolate multiple times via `stream`. So you can build your `widget` with `StreamBuilder` and always listen to the value from your `isolate`.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

stream_channel

More

Packages that depend on isolate_contactor