DebugExtension class

Extension for managing debug visualization overlays.

Provides reactive state for controlling which debug layers are shown in the node flow editor, along with the theme for debug visualizations.

Usage

// Configure via NodeFlowConfig
NodeFlowConfig(
  extensions: [
    DebugExtension(
      mode: DebugMode.spatialIndex,
      theme: DebugTheme.dark,
    ),
  ],
);

// Access via controller
controller.debug.isEnabled;        // true
controller.debug.showSpatialIndex; // true
controller.debug.showAutoPanZone;  // false
controller.debug.theme;            // DebugTheme.dark

// Toggle at runtime
controller.debug.toggle();

// Set specific mode
controller.debug.setMode(DebugMode.all);
Inheritance

Constructors

DebugExtension({DebugMode mode = DebugMode.none, DebugTheme theme = DebugTheme.light})
Creates a debug extension.

Properties

hashCode int
The hash code for this object.
no setterinherited
id String
Unique identifier for this extension.
no setteroverride
isEnabled bool
Whether any debug visualization is enabled.
no setter
mode DebugMode
Current debug mode.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showAutoPanZone bool
Whether the autopan zone debug layer should be shown.
no setter
showSpatialIndex bool
Whether the spatial index debug layer should be shown.
no setter
theme DebugTheme
The visual theme for debug visualizations.
no setter

Methods

attach(NodeFlowController controller) → void
Called when the extension is attached to a controller.
override
cycle() → void
Cycles through all debug modes in order: none -> all -> spatialIndex -> autoPanZone -> none
detach() → void
Called when the extension is detached from the controller.
override
hide() → void
Hides all debug visualizations.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onEvent(GraphEvent event) → void
Called when a graph event occurs.
override
setMode(DebugMode mode) → void
Sets the debug mode.
showAll() → void
Shows all debug visualizations.
showOnlyAutoPanZone() → void
Shows only the autopan zone visualization.
showOnlySpatialIndex() → void
Shows only the spatial index visualization.
toggle() → void
Toggles debug mode between none and all.
toString() String
A string representation of this object.
inherited

Operators

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