reacton_devtools 0.1.2 copy "reacton_devtools: ^0.1.2" to clipboard
reacton_devtools: ^0.1.2 copied to clipboard

Flutter DevTools extension for Reacton. Provides reactive graph visualization, reacton inspector, timeline view, and state branching UI.

example/example.dart

import 'package:reacton/reacton.dart';
import 'package:reacton_devtools/reacton_devtools.dart';

// Define some reactons for demonstration.
final counterReacton = reacton(0, name: 'counter');
final doubleCountReacton = computed(
  (read) => read(counterReacton) * 2,
  name: 'doubleCount',
);

void main() {
  // 1. Create a ReactonStore.
  final store = ReactonStore();

  // 2. Install DevTools extension - this registers service extensions
  //    that the Flutter DevTools UI uses to inspect state.
  ReactonDevToolsExtension.install(store);

  // Once installed, DevTools can:
  //   - Visualize the reactive dependency graph
  //   - Inspect current reacton values
  //   - View a timeline of state changes
  //   - Monitor per-reacton performance metrics
  //   - Edit reacton values at runtime

  // 3. Use the store as normal.
  store.set(counterReacton, 5);
  print('Counter: ${store.get(counterReacton)}');
  print('Double:  ${store.get(doubleCountReacton)}');

  // In a Flutter app, call install() once during app initialization:
  //
  // void main() {
  //   final store = ReactonStore();
  //   ReactonDevToolsExtension.install(store);
  //   runApp(ReactonScope(store: store, child: MyApp()));
  // }

  store.dispose();
}
0
likes
150
points
15
downloads

Documentation

API reference

Publisher

verified publishersitharaj.in

Weekly Downloads

Flutter DevTools extension for Reacton. Provides reactive graph visualization, reacton inspector, timeline view, and state branching UI.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

devtools_extensions, flutter, reacton

More

Packages that depend on reacton_devtools