DevToolsState class
Tracks all reactive state for DevTools inspection.
Provides real-time monitoring of:
- All refs and their values
- All computed values
- All active effects
- Store registrations
// Get all refs
final refs = DevToolsState.instance.getAllRefs();
// Listen for state changes
DevToolsState.instance.addListener((change) {
print('${change.type}: ${change.targetName}');
});
Properties
- enabled ↔ bool
-
Enables or disables state tracking.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onStateChange
→ Stream<
StateChange> -
Stream of state changes.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addListener(
void listener(StateChange)) → void - Adds a state change listener.
-
clearHistory(
) → void - Clears history.
-
dispose(
) → void - Disposes resources.
-
getAllRefs(
) → Map< String, RefSnapshot> - Gets all refs with current values.
-
getHistory(
{int? limit}) → List< StateChange> - Gets recent state change history.
-
getStoreState(
) → Map< String, Map< String, RefSnapshot> > - Gets all stores with their refs.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onComputedUpdate(
String computedId, String? name, dynamic newValue) → void - Records a computed recalculation.
-
onEffectRun(
String effectId, String? name) → void - Records an effect execution.
-
onRefChange<
T> (String refId, String? refName, T oldValue, T newValue, {String? storeName}) → void - Records a ref value change.
-
removeListener(
void listener(StateChange)) → void - Removes a state change listener.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → DevToolsState
-
final