Skip to content
pubscout

typed_isolate

6.0.0, released 2 years ago by an unverified publisher

Type-safe isolate usage with parent and child support and two-way communication.

$ flutter pub add typed_isolate
Source repository

What it does

Provides type-safe helper classes to spawn, manage, and communicate with child isolates from a parent isolate using streams and messages. It supports long-living isolates and handles messaging safely with generics.

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

Use it when

  • You need type-safe communication between a main isolate and worker isolates
  • You want to manage long-living background isolates easily

Skip it when

  • You only need simple one-off background computations (where Isolate.run is sufficient)

Strengths

  • Full type safety via type arguments everywhere
  • Easy two-way communication setup between parent and child isolates

Weaknesses

  • Limited to the package's specific parent/child architecture model

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1

Not documented

void main() async {
  final parent = IsolateParent<int, String>();
  parent.init();
  parent.stream.listen(print);
  await parent.spawn(MyChildIsolate(id: "my-child-id"));
  parent.sendToChild(id: "my-child-id", data: 1);
}

Alternatives

Packages that do the same job and could replace typed_isolate.

  • pubspec_parse

    Parse pubspec.yaml files with a type‑safe API and detailed error reporting.

  • deep_pick

    Type-safe API for manual JSON parsing with useful error messages.

  • isolate_channel

    Communication channels for isolates based on Flutter's platform channels.

  • dart_either

    Either monad for Dart and Flutter supporting type-safe error handling and railway-oriented programming.

Works with

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