NodeFlowBehavior enum

Defines how the node flow canvas behaves.

Each behavior mode has specific capabilities that determine what interactions are allowed. Uses consolidated CRUD properties that apply to all elements (nodes, ports, connections, annotations):

  • Create: Add new items
  • Read: Always allowed (viewing)
  • Update: Modify existing items (edit labels, etc.)
  • Delete: Remove items

Plus viewport/interaction controls:

  • Drag: Move nodes and annotations
  • Select: Select elements
  • Pan: Pan the viewport
  • Zoom: Zoom the viewport

Example:

final behavior = NodeFlowBehavior.preview;
if (behavior.canDrag) {
  // Allow dragging nodes and annotations
}
Inheritance
Available extensions

Values

design → const NodeFlowBehavior

Full editing mode - create, modify, delete everything.

Use this for the main editor interface where users design graphs.

const NodeFlowBehavior(canCreate: true, canUpdate: true, canDelete: true, canDrag: true, canSelect: true, canPan: true, canZoom: true)
preview → const NodeFlowBehavior

Preview mode - navigate and rearrange, but no structural changes.

Use this for reviewing graphs where layout adjustments are allowed but the graph structure cannot be modified. Ideal for run/debug modes where you want to see execution state.

const NodeFlowBehavior(canCreate: false, canUpdate: false, canDelete: false, canDrag: true, canSelect: true, canPan: true, canZoom: true)
present → const NodeFlowBehavior

Presentation mode - display only, no interaction.

Use this for embedded displays, thumbnails, or presentation contexts where the graph should be completely non-interactive.

const NodeFlowBehavior(canCreate: false, canUpdate: false, canDelete: false, canDrag: false, canSelect: false, canPan: false, canZoom: false)

Properties

canCreate bool
Whether new elements can be created (nodes, connections, annotations).
final
canDelete bool
Whether elements can be deleted.
final
canDrag bool
Whether elements can be dragged to new positions (nodes, annotations).
final
canModify bool
Whether any modifications are allowed.
no setter
canPan bool
Whether the viewport can be panned.
final
canSelect bool
Whether elements can be selected.
final
canUpdate bool
Whether elements can be updated (edit labels, waypoints, etc.).
final
canZoom bool
Whether the viewport can be zoomed.
final
hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
isInteractive bool
Whether any interaction is allowed.
no setter
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
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

Constants

values → const List<NodeFlowBehavior>
A constant List of the values in this enum, in order of their declaration.