rxdart_devtools 0.1.1 copy "rxdart_devtools: ^0.1.1" to clipboard
rxdart_devtools: ^0.1.1 copied to clipboard

A Dart & Flutter DevTools extension for inspecting RxDart Subjects and Dart Streams. Simple SDK to set up for value/error introspection and injection.

rxdart_devtools #

A Dart & Flutter DevTools extension for inspecting and debugging RxDart Subjects and Dart Streams. It provides a user friendly UI to see the current value, emission history, and value or error injection.

pub package pub points pub likes License: MIT

rxdart_devtools panel in action

Why #

Flutter has awesome first class support for Streams, and RxDart is a great extension on top of it that lets you write Reactive code. But, debugging them is currently not easy. print ladders inside .listen callbacks don't scale when you want to quickly identify a Stream or Subject and have a user friendly UI to see the current value, emission history, and inject values or errors to see how the app responds.

rxdart_devtools adds a RxDart tab to DevTools that lists every stream you've tagged with .track('name'), shows its current value, counts listeners and emissions, and lets you push values into injectable subjects without touching app code.

Install #

Install the latest published package:

flutter pub add rxdart_devtools

Or add the dependency to your pubspec.yaml:

dependencies:
  rxdart_devtools: ^0.1.1

then fetch it:

flutter pub get

Quick start #

import 'package:flutter/material.dart';
import 'package:rxdart/rxdart.dart';
import 'package:rxdart_devtools/sdk.dart';

void main() {
  RxDartDevtools.init();

  final counter = BehaviorSubject<int>.seeded(0)
      .track('counter')
      .enableInjection(parse: int.tryParse)
      .asSubject();

  counter.add(1);
  counter.add(2);

  runApp(MyApp(counter: counter));
}

That's it. counter behaves like a normal BehaviorSubject<int> everywhere in your app — the tracking is transparent.

Open the panel #

  1. Run your app: flutter run (any target — mobile, web, desktop)
  2. Open DevTools from the terminal (d in flutter run) or your IDE
  3. Click the rxdart tab in the DevTools toolbar
  4. You'll see counter and its current value, ready to inject

If the rxdart tab doesn't appear, your app needs to depend on rxdart_devtools (DevTools discovers extensions through dependencies).

Production safety #

RxDartDevtools.init() and .track() are kReleaseMode-guarded no-ops. The Dart AOT compiler dead-code-eliminates the registry and supporting code, so nothing ships in a release build.

Compatibility #

Version
Dart SDK ^3.6.0
Flutter >=3.27.0
rxdart ^0.28.0
Platforms Wherever DevTools runs (mobile, web, desktop)

Status #

Early release — API may change before 1.0. The panel and tracking surface work end-to-end; injection, complex value rendering, and event history are in place. Edge cases will appear; please file issues.

License #

MIT. This is a community project, not affiliated with or endorsed by the rxdart maintainers or ReactiveX.

1
likes
160
points
0
downloads

Documentation

API reference

Publisher

verified publisherkijonghan.io

Weekly Downloads

A Dart & Flutter DevTools extension for inspecting RxDart Subjects and Dart Streams. Simple SDK to set up for value/error introspection and injection.

Repository (GitHub)
View/report issues
Contributing

Topics

#rxdart #devtools #streams #debugging #flutter

License

MIT (license)

Dependencies

collection, flutter, get_it, json_annotation, meta, result_dart, rxdart, uuid

More

Packages that depend on rxdart_devtools