PointConnection constructor

PointConnection({
  1. required GlobeCoordinates start,
  2. required GlobeCoordinates end,
  3. required String id,
  4. String? label,
  5. Offset labelOffset = const Offset(0, 0),
  6. Widget? labelBuilder(
    1. BuildContext context,
    2. PointConnection pointConnection,
    3. bool isHovering,
    4. bool isVisible,
    )?,
  7. double curveScale = 1.5,
  8. TextStyle? labelTextStyle,
  9. bool isMoving = false,
  10. bool isLabelVisible = false,
  11. PointConnectionStyle style = const PointConnectionStyle(),
  12. VoidCallback? onTap,
  13. 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,
});