Coordinates the visual representation and interaction handling of a graph.
This interface serves as the central coordinator between:
- Visual representation through GraphNodeViewBehavior and GraphLinkViewBehavior
- Geometric calculations via GraphCircle and GraphRectangle models
- User interaction handling via dispatched GraphEvents.
The interface provides two key customization points:
- createNodeViewBehavior and createLinkViewBehavior for visual styling
- Event handlers like onTap, onSelectionChange for interaction logic
For most use cases, extend GraphViewDefaultBehavior and override specific methods rather than implementing this interface directly.
See also:
- GraphNodeViewBehavior, for node visualization control
- GraphLinkViewBehavior, for link visualization control
- GraphViewDefaultBehavior, for the standard implementation
- GraphEvent, for the base class of all interaction events
- Implementers
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
-
createLinkViewBehavior(
) → GraphLinkViewBehavior - Creates the behavior configuration for link rendering.
-
createNodeViewBehavior(
) → GraphNodeViewBehavior - Creates the behavior configuration for node rendering.
-
getConnectionPoints(
GraphNode source, GraphNode target, Widget sourceWidget, Widget targetWidget) → GraphConnectionPoints? - Calculates connection points between two nodes.
-
hitTestLink(
covariant GraphLink link, Offset position) → bool - Tests if a link contains the given position.
-
hitTestNode(
covariant GraphNode node, Offset position) → bool - Tests if a node contains the given position.
-
isEquivalentTo(
GraphViewBehavior other) → bool - Compares this behavior with another for content equality.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onDoubleTap(
GraphTapEvent event) → void - Called when entities are double-tapped.
-
onDragEnd(
GraphDragEndEvent event) → void - Called when a drag operation on entities completes.
-
onDragStart(
GraphDragStartEvent event) → void - Called when a drag operation starts on entities.
-
onDragUpdate(
GraphDragUpdateEvent event) → void -
Called during a drag operation on entities.
Use
event.deltafor positional changes. -
onHoverEnd(
GraphHoverEndEvent event) → void - Called when the mouse pointer leaves an entity's area.
-
onHoverEnter(
GraphHoverEvent event) → void - Called when the mouse pointer enters an entity's area.
-
onHoverMove(
GraphHoverEvent event) → void - Called when the mouse pointer moves within an entity's area.
-
onSelectionChange(
GraphSelectionChangeEvent event) → void - Called when the selection changes.
-
onTap(
GraphTapEvent event) → void - Called when entities are tapped (single or double).
-
onTooltipHide(
GraphTooltipHideEvent event) → void - Called when an entity's tooltip is hidden.
-
onTooltipShow(
GraphTooltipShowEvent event) → void - Called when an entity's tooltip is shown.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited