bloc_devtools_extension library

Time-travel dev tools for flutter_bloc — inspired by Redux DevTools.

Provides state history, BLoC connection graph, performance metrics, state diff, event timeline, time-travel controls, and a Flutter DevTools Extension tab.

Quick start

import 'package:bloc_devtools_extension/bloc_devtools_extension.dart';

void main() {
  Bloc.observer = BlocDevToolsObserver(DevToolsStore.instance);
  // Register the VM service extension for the DevTools browser tab:
  registerBlocDevToolsServiceExtension(DevToolsStore.instance);
  runApp(MyApp());
}

Classes

BlocDevToolsObserver
A BlocObserver that records transitions, lifecycle events, performance timing, and keeps live BLoC references for state replay.
BlocDevToolsPanel
The main dev tools panel widget with three tabs: History (timeline + slider + state inspector), Graph (live BLoC connection map), Performance (processing metrics).
BlocLifecycleRecord
Tracks the lifecycle of a single BLoC or Cubit instance.
BlocRelationship
Describes a detected relationship between two BLoC types.
DevToolsEntry
Represents a single recorded entry in the BLoC dev tools history.
DevToolsStore
Centralized store for the BLoC dev tools extension.
DevToolsStoreProvider
An InheritedWidget that provides a DevToolsStore to the widget tree.
StateDiffEntry
Result of diffing a single field between two states.

Enums

DiffType

Functions

registerBlocDevToolsServiceExtension(DevToolsStore store) → void
Registers a Dart VM Service Extension that exposes DevToolsStore data to the Flutter DevTools browser UI.