isolate_executor 2.0.2

  • Installing
  • Versions
  • 75


This library contains types that allow for executing code in a spawned isolate, perhaps with additional imports.

Subclass Executable and override its execute method. Invoke IsolateExecutor.executeWithType, passing in that subclass. The code in execute will run in another isolate. Any value it returns will be returned by IsolateExecutor.executeWithType.

A returned value must be a primitive type (anything that is encodable as JSON). You may pass parameters to the other isolate by providing a message map.


class Echo extends Executable {
  Echo(Map<String, dynamic> message)
      : echoMessage = message['echo'],

  final String echoMessage;

  Future<dynamic> execute() async {
    return echoMessage;

Future main() async {
    final result = await IsolateExecutor.executeWithType(Echo, message: {'echo': 'hello'});
    assert(result == 'hello');



  • Improve stack trace readability


  • Update for Dart 2


  • Fixes issue when used on Windows OS


  • Initial release

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  isolate_executor: ^2.0.2

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:isolate_executor/isolate_executor.dart';
Version Uploaded Documentation Archive
2.0.2 Nov 15, 2018 Go to the documentation of isolate_executor 2.0.2 Download isolate_executor 2.0.2 archive
2.0.1 Aug 8, 2018 Go to the documentation of isolate_executor 2.0.1 Download isolate_executor 2.0.1 archive
2.0.0 Aug 6, 2018 Go to the documentation of isolate_executor 2.0.0 Download isolate_executor 2.0.0 archive
1.0.1 May 16, 2018 Go to the documentation of isolate_executor 1.0.1 Download isolate_executor 1.0.1 archive
1.0.0 Apr 13, 2018 Go to the documentation of isolate_executor 1.0.0 Download isolate_executor 1.0.0 archive
2.0.0-dev.2 Jul 4, 2018 Go to the documentation of isolate_executor 2.0.0-dev.2 Download isolate_executor 2.0.0-dev.2 archive
2.0.0-dev.1 Jul 4, 2018 Go to the documentation of isolate_executor 2.0.0-dev.1 Download isolate_executor 2.0.0-dev.1 archive
2.0.0-dev May 17, 2018 Go to the documentation of isolate_executor 2.0.0-dev Download isolate_executor 2.0.0-dev archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7


Detected platforms: other

Primary library: package:isolate_executor/isolate_executor.dart with components: io, isolate, mirrors.

Health issues and suggestions

Document public APIs (-9.58 points)

23 out of 24 API elements (library, class, field or method) have no adequate dartdoc content. Good documentation improves code readability and discoverability through search.

Format lib/src/executable.dart.

Run dartfmt to format lib/src/executable.dart.

Format lib/src/executor.dart.

Run dartfmt to format lib/src/executor.dart.

Format lib/src/source_generator.dart.

Run dartfmt to format lib/src/source_generator.dart.

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use isolate_executor.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
analyzer >=0.32.0 <0.34.0 0.33.6 0.34.0
Transitive dependencies
args 1.5.1
async 2.0.8
charcode 1.1.2
collection 1.14.11
convert 2.0.2
crypto 2.0.6
csslib 0.14.6
front_end 0.1.6+8 0.1.7
glob 1.1.7
html 0.13.3+3
kernel 0.3.6+8 0.3.7
logging 0.11.3+2
meta 1.1.6
package_config 1.0.5
path 1.6.2
plugin 0.2.0+3
pub_semver 1.4.2
source_span 1.4.1
string_scanner 1.0.4
typed_data 1.1.6
utf 0.9.0+5
watcher 0.9.7+10
yaml 2.1.15
Dev dependencies
test ^1.3.0