Skip to content
pubscout

rx

0.5.0, released a year ago by lukas-renggli.ch

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

WASM-ready
$ flutter pub add rx
Source repository

What it does

Provides a set of observable types, subjects, and operators for composing asynchronous data flows. Includes converters to and from Dart Streams and Futures, plus experimental reactive values.

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

Use it when

  • You need fine‑grained control over async data pipelines
  • You prefer Rx‑style operators over native Stream methods
  • You want a lightweight, pure‑Dart reactive library

Skip it when

  • You require a full state‑management solution
  • You need code‑generation based APIs

Strengths

  • Rich set of operators and subjects
  • Works without depending on Dart Stream API
  • Well‑tested and documented

Weaknesses

  • Experimental; may lack some Rx features
  • Requires Dart 3.8+
  • No built‑in state‑management integration

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
4
import 'package:rx/rx.dart';

void main() {
  final obs = Observable.fromIterable([1, 2, 3])
      .map((x) => x * 2)
      .filter((x) => x > 2);
  obs.listen(print); // prints 4, 6
}

Alternatives

Packages that do the same job and could replace rx.

  • synchronized

    Lock mechanism to prevent concurrent access to asynchronous code.

  • rxdart

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

  • secretary

    A Dart library for managing queues of asynchronous tasks with validation, retries and event streams.

  • dart_either

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

Works with

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