HyperRenderDebugHooks class abstract final

Zero-overhead hook points for DevTools integration.

hyper_render_devtools injects callbacks here at startup so it can observe renderer lifecycle and layout results WITHOUT creating a circular package dependency (core ← devtools would be circular).

All fields are null in release builds and the call sites are guarded by kDebugMode, so there is no production overhead.

Usage (by hyper_render_devtools)

HyperRenderDebugHooks.onRendererAttached = (id, getDoc) { ... };
HyperRenderDebugHooks.onRendererDetached = (id) { ... };
HyperRenderDebugHooks.onLayoutComplete   = (id, getFrags, getLines) { ... };

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

getPerformanceData Map<String, dynamic>? Function(String id)?
Optional getter injected by devtools to retrieve the latest PerformanceReport-like map for a renderer by id.
getter/setter pair
isActive bool
Returns true only when at least one hook is registered. Used as a fast-path guard in hot paths.
no setter
onLayoutComplete ↔ void Function(String id, List<Map<String, dynamic>> getFragments(), List<Map<String, dynamic>> getLines())?
Called at the end of each successful performLayout pass.
getter/setter pair
onRendererAttached ↔ void Function(String id, DocumentNode? getDocument())?
Called when a RenderHyperBox is attached to the pipeline.
getter/setter pair
onRendererDetached ↔ void Function(String id)?
Called when a RenderHyperBox is detached from the pipeline.
getter/setter pair