PointConnection constructor
- required GlobeCoordinates start,
- required GlobeCoordinates end,
- required String id,
- String? label,
- Offset labelOffset = const Offset(0, 0),
- Widget? labelBuilder(
- BuildContext context,
- PointConnection pointConnection,
- bool isHovering,
- bool isVisible,
- double curveScale = 1.5,
- TextStyle? labelTextStyle,
- bool isMoving = false,
- bool isLabelVisible = false,
- PointConnectionStyle style = const PointConnectionStyle(),
- VoidCallback? onTap,
- VoidCallback? onHover,
Creates a new PointConnection instance.
The start
and end
parameters represent the coordinates of the start and end points of the connection.
The id
parameter is a unique identifier for the connection.
The label
parameter is an optional label for the connection.
The labelOffset
parameter represents the offset of the label from the connection line.
The curveScale
parameter represents the scale of the curve.
The labelBuilder
parameter is a function that builds the label widget for the connection.
The labelTextStyle
parameter represents the style of the label text.
The isMoving
parameter indicates whether the connection is currently moving.
The isLabelVisible
parameter indicates whether the label is currently visible.
The style
parameter represents the style of the connection line.
The onTap
parameter is a callback function that is called when the connection is tapped.
The onHover
parameter is a callback function that is called when the connection is hovered over.
Implementation
PointConnection({
required this.start,
required this.end,
required this.id,
this.label,
this.labelOffset = const Offset(0, 0),
this.labelBuilder,
this.curveScale = 1.5,
this.labelTextStyle,
this.isMoving = false,
this.isLabelVisible = false,
this.style = const PointConnectionStyle(),
this.onTap,
this.onHover,
});