rxdart
0.28.0, released 2 years ago by fluttercommunity.dev
Implementation of the ReactiveX API for asynchronous programming leveraging native Dart Streams.
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.
72Compare - structured_async
Structured asynchronous programming and cancellable futures for Dart.
39Compare
Works with
Packages commonly used together with rxdart: ones it builds on, ones built on it, and its own family.
- flutter_cache_managerBuilt on rxdartGeneric cache manager for saving web files and cache info on device storage.
- audio_sessionBuilt on rxdartManages iOS audio session categories, Android audio attributes, and audio focus/ducking.
- just_audioBuilt on rxdartFeature‑rich audio player for Flutter supporting gapless playlists and multiple sources
- pdfrxBuilt on rxdartFast, cross‑platform PDF viewer and editor widget for Flutter apps.
- custom_lintBuilt on rxdartTool for creating and running custom Dart lint rules
- pdfrx_engineBuilt on rxdartPure Dart PDF rendering and manipulation API built on top of PDFium.
- custom_lint_builderBuilt on rxdartA package to help writing custom linters.
- graphqlBuilt on rxdartA Dart GraphQL client offering queries, mutations, subscriptions and cache management.