DebugPlugin class
Plugin 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(
plugins: [
DebugPlugin(
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
-
- Object
- NodeFlowPlugin
- DebugPlugin
Constructors
- DebugPlugin({DebugMode mode = DebugMode.none, DebugTheme theme = DebugTheme.light})
- Creates a debug plugin.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier for this plugin.
no setteroverride
- isEnabled → bool
-
Whether any debug visualization is enabled.
no setter
- layerPosition → LayerPosition
-
The position where this layer should be rendered.
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 plugin is attached to a controller.
override
-
buildLayer(
BuildContext context) → Widget? - Builds the layer widget to render.
-
cycle(
) → void - Cycles through all debug modes in order: none -> all -> spatialIndex -> autoPanZone -> none
-
detach(
) → void -
Called when the plugin 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.
-
setTransformationController(
TransformationController? controller) → void - Sets the transformation controller for viewport tracking in debug layers.
-
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