Skip to content
pubscout

isolate_manager

6.3.2, released 7 months ago by lamnhan.dev

Manage long-lived isolates across native, Web, and WASM platforms with built-in queuing and workers.

WASM-ready
$ flutter pub add isolate_manager
Source repository

What it does

Simplify concurrent programming in Flutter and Dart by providing long-lived single or multi-function isolates, automatic task queuing, and web worker generation. It allows running heavy calculations seamlessly on native threads, JavaScript Workers, and WebAssembly.

AI-written summary of version 6.3.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to run heavy background computations without freezing the UI thread.
  • Your Flutter app targets web and WASM alongside mobile and desktop.
  • You want advanced queue management like priority tasks or custom overflow strategies.

Skip it when

  • Your app requires simple, one-off asynchronous functions where `compute` from `flutter/foundation.dart` is sufficient.
  • You cannot annotate your isolate functions as static or top-level entries.

Strengths

  • True cross-platform support including Web Workers and WebAssembly (WASM).
  • Intelligent queue system with custom strategies and priority handling.
  • Versatile isolate types (one-off, single-function, and multi-function).

Weaknesses

  • Web targets require a separate generator command to compile JS workers.
  • Functions targeting web workers have strict data transfer limitations.

Setup

Kind
Pure Dart
Effort
Low
Code generation
Yes (build_runner)
Direct dependencies
3

No setup required for Mobile & Desktop. Web targets require running the isolate generator and ensuring proper headers if using WASM.

import 'package:isolate_manager/isolate_manager.dart';

@pragma('vm:entry-point')
int sum(List<int> numbers) {
  return numbers.reduce((a, b) => a + b);
}

void main() async {
  final result = await IsolateManager.runFunction(sum, [1, 2, 3]);
  print('Result: $result');
}

Alternatives

Packages that do the same job and could replace isolate_manager.

Works with

Packages commonly used together with isolate_manager: ones it builds on, ones built on it, and its own family.