Skip to content
pubscout

rxdart

0.28.0, released 2 years ago by fluttercommunity.dev

Implementation of the ReactiveX API for asynchronous programming leveraging native Dart Streams.

Flutter FavoriteWASM-readyQuiet but busy
$ flutter pub add rxdart
Source repository

What it does

RxDart extends the capabilities of Dart Streams and StreamControllers by adding additional Stream classes, extension methods, and Subjects from the reactive extensions specification. It enables complex stream transformations like throttling, buffering, merging, and combining without replacing the core Dart Streams API.

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

Use it when

  • You need advanced asynchronous event stream manipulation like debouncing, throttling, or flattening.
  • You want to use Subject patterns or combine multiple streams using operators like zip, combineLatest, or merge.

Skip it when

  • Native Dart Streams and async/await already cleanly solve your asynchronous logic without extra complexity.
  • You are looking for a complete architectural state management framework rather than just stream extensions.

Strengths

  • Extensively rich set of stream extension methods and subjects.
  • Leverages native Dart Streams rather than inventing a parallel stream hierarchy.
  • Widely adopted and supported across all platforms.

Weaknesses

  • Can add unnecessary complexity for simple asynchronous tasks.
  • Steeper learning curve for developers unfamiliar with ReactiveX concepts.

Setup

Kind
Pure Dart
Effort
Low
Code generation
Yes (build_runner)
Direct dependencies
0
import 'package:rxdart/rxdart.dart';

void main() {
  Stream.fromIterable([1, 2, 3])
    .throttleTime(Duration(seconds: 1))
    .listen(print);
}

Alternatives

Packages that do the same job and could replace rxdart.

  • rx

    Reactive Extensions library for Dart offering observable streams and async operators.

  • structured_async

    Structured asynchronous programming and cancellable futures for Dart.

Works with

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