rx
0.5.0, released a year ago by lukas-renggli.ch
Reactive Extensions library for Dart offering observable streams and async operators.
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.
93Compare - rxdart
Implementation of the ReactiveX API for asynchronous programming leveraging native Dart Streams.
50Compare - secretary
A Dart library for managing queues of asynchronous tasks with validation, retries and event streams.
74Compare - dart_either
Either monad for Dart and Flutter supporting type-safe error handling and railway-oriented programming.
81Compare
Works with
Packages commonly used together with rx: ones it builds on, ones built on it, and its own family.
- matcherrx depends on itSupport for specifying test expectations via an extensible Matcher class.
- morerx depends on itA collection of utility extensions and specialized data structures for Dart.
- dataSame familyTime and space efficient data structures and algorithms for vectors, matrices, and math.
- fake_cloud_firestoreBuilt on rxFake implementation of Cloud Firestore for unit testing.