plough library

Classes

GestureDebugEvent
Internal debug event for gesture processing
GestureTimerLogger
Helper for logging timer-related events
Graph
A core data structure that provides the foundation for graph visualization through GraphView.
GraphCircle
A circular node shape.
GraphConnectionGeometry
Manages geometric relationships between connected nodes.
GraphConnectionPoints
Defines the connection points between nodes for link calculation and rendering.
GraphCustomLayoutStrategy
A layout strategy that enables custom node positioning through a delegate pattern.
GraphCustomLayoutStrategyDelegate
Interface for implementing custom graph layout algorithms.
GraphDefaultLinkRenderer
A comprehensive default link widget used by GraphLinkViewBehavior.
GraphDefaultLinkRendererStyle
Controls link appearance with colors and dimensions that automatically update with state changes. Customizable properties include arrow styles and line thickness.
GraphDefaultNodeRenderer
A highly customizable default node widget used by GraphNodeViewBehavior.
GraphDefaultNodeRendererStyle
Controls node appearance with color and dimension options that automatically update based on interaction states.
GraphDragEndEvent
Event fired when a drag operation on one or more entities ends.
GraphDragStartEvent
Event fired when a drag operation starts on one or more entities.
GraphDragUpdateEvent
Event fired during a drag operation on one or more entities.
GraphEntity
The fundamental interface defining a graph entity within the visualization system.
GraphEntityEvent
Base class for events related to one or more graph entities.
GraphEvent
Base class for all graph interaction events.
GraphForceDirectedLayoutStrategy
A physics-based layout strategy using a force-directed algorithm.
GraphHitTestResult
Detailed information about what was hit during a gesture.
GraphHoverEndEvent
Event fired when the mouse pointer leaves the area of an entity.
GraphHoverEvent
Event fired when the mouse pointer enters the area of an entity.
GraphId
A unique identifier for graph elements.
GraphLayoutStrategy
The base class for graph layout algorithms.
Manages connections between graph nodes with support for directionality, routing, and visual styling. Extends GraphEntity with link-specific functionality.
GraphLinkViewBehavior
Controls the visualization and interaction behavior of graph links.
GraphManualLayoutStrategy
A layout strategy for manual node positioning.
GraphNode
Core component of graph visualization that manages visual properties, animation states, and interaction behaviors. Extends GraphEntity with node-specific functionality.
GraphNodeLayoutPosition
Holds position information for a node in the graph layout system.
GraphNodeViewBehavior
Controls how nodes are rendered and how they interact with user input.
GraphNodeViewGeometry
Defines a node's layout bounds for rendering and hit testing.
GraphOrderManager
A utility class for managing the ordering of graph entities.
GraphRandomLayoutStrategy
A layout strategy that positions nodes randomly within the available space.
GraphRectangle
A rectangular node shape.
GraphSelectionChangeEvent
Event fired when the selection state of entities changes.
GraphShape
An interface for defining node shapes in the graph.
GraphTapEvent
Event fired when one or more entities are tapped (single or double).
GraphTooltip
GraphTooltipBehavior
Controls the display and behavior of tooltips for graph entities.
GraphTooltipHideEvent
Event fired when an entity's tooltip is hidden.
GraphTooltipShowEvent
Event fired when an entity's tooltip is shown.
GraphTreeLayoutStrategy
A layout strategy that arranges nodes in a hierarchical tree structure.
GraphView
The main widget for displaying a graph.
GraphViewBehavior
Coordinates the visual representation and interaction handling of a graph.
GraphViewDefaultBehavior
A default implementation of graph view behavior with standard visualization features.
Plough
Singleton class that manages the global settings of the Plough library.
PointerEventDetails
Contains details about the pointer event that triggered a graph event.

Enums

GestureDebugEventType
Debug event types for internal gesture processing
GestureDebugSeverity
Debug event severity levels
GraphDefaultNodeRendererShape
Shape options available for nodes in the default renderer.
GraphGestureMode
Specifies how GraphView should handle gestures.
GraphIdType
Identifies the type of graph element an ID belongs to.
GraphLayoutPositionOrigin
Defines the reference point for manual node positioning.
GraphLinkDirection
The direction of a link between nodes.
GraphLinkRouting
Specifies how links connect between nodes.
GraphTooltipPosition
Specifies where tooltips appear relative to their target entities.
GraphTooltipTriggerMode
Defines when tooltips should be displayed in response to user interactions.
GraphTreeLayoutDirection
Specifies the direction in which the tree should expand.
LogCategory
Logger categories for selective logging control

Properties

gestureDebugEventStream Stream<GestureDebugEvent>
Get stream of debug events
no setter
isGestureDebugEnabled bool
Check if gesture debug mode is enabled
no setter

Functions

logBackgroundCallback(String component, String callbackType, String position, {Map<String, dynamic>? data, String? gesturePhase}) → void
Helper for logging background callbacks
logConditionCheck(String component, String condition, {required bool result, Map<String, dynamic>? data, String? entityId, String? gesturePhase}) → void
Helper for logging condition checks
logGestureDebug(GestureDebugEventType type, String component, String message, {Map<String, dynamic>? data, GestureDebugSeverity severity = GestureDebugSeverity.debug, String? entityId, String? gesturePhase}) → void
Log internal gesture debug events
logGestureDecision(String component, String decision, String reason, {Map<String, dynamic>? data, String? entityId, String? gesturePhase}) → void
Helper for logging gesture decisions
logGestureFlow(GestureDebugEventType type, String component, String entityId, String phase, {Map<String, dynamic>? data, String? message}) → void
Convenience method for logging gesture flow events
logHitTest(String component, String position, GraphId? hitEntity, {Map<String, dynamic>? data, String? gesturePhase}) → void
Helper for logging hit test results
logStateCreate(String component, String stateType, String entityId, {Map<String, dynamic>? data, String? gesturePhase}) → void
Helper for logging state creation
logStateDestroy(String component, String stateType, String entityId, {Map<String, dynamic>? data, String? gesturePhase}) → void
Helper for logging state destruction
logStateTransition(String component, String fromState, String toState, {Map<String, dynamic>? data, String? entityId, String? gesturePhase}) → void
Helper for logging state transitions
setGestureDebugMode(bool enabled) → void
Enable or disable gesture debug mode

Typedefs

GraphBackgroundGestureCallback = void Function(Offset localPosition)
Callback for handling background gestures that are not consumed by GraphView.
GraphBackgroundPanCallback = void Function(Offset localPosition, Offset delta)
Callback for handling background pan gestures.
GraphDefaultNodeRendererWidgetBuilder = Widget Function(BuildContext context, Graph graph, GraphNode node, Widget? child)
A builder function type for customizing node rendering.
GraphGestureConsumptionCallback = bool Function(Offset localPosition, GraphHitTestResult hitTestResult)
Callback for determining whether GraphView should consume a gesture.
GraphLinkWidgetBuilder = Widget Function(BuildContext context, Graph graph, GraphLink link, Widget sourceView, Widget targetView, GraphLinkRouting routing, GraphConnectionGeometry geometry, Widget? child)
A function type for building link widgets.
GraphLinkWidgetThicknessGetter = double Function(BuildContext context, Graph graph, GraphLink link, Widget sourceView, Widget targetView)
A function type for dynamically calculating link thickness.
GraphNodeWidgetBuilder = Widget Function(BuildContext context, Graph graph, GraphNode node, Widget? child)
A function type for building node widgets.
GraphTooltipWidgetBuilder = Widget Function(BuildContext context, GraphEntity entity)
A builder for creating tooltip widgets for graph entities.
GraphTreeLayoutRootNodeSelector = GraphId Function(Iterable<GraphNode> nodes)
Callback for selecting the root node of the tree layout.
GraphTreeLayoutSiblingNodeComparator = int Function(GraphNode a, GraphNode b)
Callback for determining the order of sibling nodes in the tree.