Skip to content
pubscout

stream_transform

2.1.2, released 3 months ago by tools.dart.dev

Extension methods adding common stream transform operators

WASM-readyRock solid
$ flutter pub add stream_transform
Source repository

What it does

Provides a collection of Stream extension methods such as asyncMapBuffer, debounce, buffer, combineLatest, merge, and others to manipulate stream events. It focuses on asynchronous control flow and rate limiting.

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

Use it when

  • You need advanced stream manipulation like debouncing or buffering
  • You want to avoid writing custom StreamTransformers for common patterns
  • You prefer Dart‑native stream extensions over RxDart

Skip it when

  • You are already using RxDart or another reactive library
  • You need only basic stream operations that are already in Dart's core library

Strengths

  • Pure Dart, no external dependencies
  • Wide range of operators covering async mapping, buffering, debouncing, merging, etc.
  • Active maintenance with recent Dart 3.4 support

Weaknesses

  • No RxDart‑style operators like switchMap with leading/trailing options
  • Limited documentation on edge cases
  • No built‑in support for backpressure handling

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0

Add dependency in pubspec and import 'package:stream_transform/stream_transform.dart';

```dart
import 'package:stream_transform/stream_transform.dart';

final stream = Stream.fromIterable([1, 2, 3]);
final debounced = stream.debounce(const Duration(milliseconds: 100));
await for (var v in debounced) {
  print(v);
}
```

Alternatives

Packages that do the same job and could replace stream_transform.

Works with

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