DiagramConnectionCommands class final
Headless connector commands for one controller: creating connectors, previewing and committing connection gestures, and editing existing ones.
Every candidate is first evaluated by the connection rule installed on the diagram, as a DiagramConnectionIntent.
- Available extensions
Constructors
- DiagramConnectionCommands(DiagramController store)
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- store → DiagramController
-
final
Methods
-
commitCreation(
String connectorId, {bool requireBoundTarget = false}) → EditResult - Finishes a new connector gesture, restoring its baseline on rejection.
-
commitEndpoint(
String id, {required bool atStart}) → EditResult -
Available on DiagramConnectionCommands, provided by the DiagramConnectionEditingCommands extension
-
create(
ConnectorElement connector, {bool select = true}) → String - Creates a connector through the same admission and history as gestures.
-
evaluate(
DiagramConnectionIntent intent) → EditResult -
evaluateConnector(
ConnectorElement connector, {DiagramConnectionIntentPhase phase = DiagramConnectionIntentPhase.commit, bool requireBoundTarget = false}) → EditResult -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
previewCreation(
ConnectorElement connector, {FreeEndpoint? deniedTargetFallback, bool select = true, String label = 'Create connector'}) → ({ConnectorElement? connector, EditResult decision}) - Publishes a new connector from the immutable gesture baseline. A denied binding may become an explicitly supplied free endpoint; without that fallback, the preview is withdrawn. The decision still reports denial.
-
previewEndpoint(
String id, {required bool atStart, required ConnectorEndpoint endpoint, FreeEndpoint? deniedTargetFallback}) → ({ConnectorElement connector, EditResult decision}) -
Available on DiagramConnectionCommands, provided by the DiagramConnectionEditingCommands extension
A rejected candidate restores the original connector unless the host explicitly requests a free endpoint fallback. -
reconnect(
String id, {required bool atStart, required ConnectorEndpoint endpoint}) → void -
Available on DiagramConnectionCommands, provided by the DiagramConnectionEditingCommands extension
Changes one endpoint atomically without requiring a mounted canvas. -
reroute(
{Iterable< String> ? connectorIds}) → EditResult -
Available on DiagramConnectionCommands, provided by the DiagramConnectionEditingCommands extension
Uses installed route planners and publishes all results as one edit. -
setRoute(
String id, {ConnectorRoute? route, double? portSpacing, Map< String, Object?> options = const {}}) → EditResult -
Available on DiagramConnectionCommands, provided by the DiagramConnectionEditingCommands extension
Changes route kind, port spacing and route options in one undo step. A new kind clears the previous kind's control points and options; any routing change discards retained route waypoints. Every option is validated against the resulting kind's schema before anything changes. -
setRoutes(
Iterable< String> ids, {ConnectorRoute? route, double? portSpacing, Map<String, Object?> options = const {}}) → EditResult -
Available on DiagramConnectionCommands, provided by the DiagramConnectionEditingCommands extension
Validates and changes several connectors with one resolution. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited