copyWith method

PointConnection copyWith({
  1. GlobeCoordinates? start,
  2. GlobeCoordinates? end,
  3. String? label,
  4. TextStyle? labelTextStyle,
  5. String? id,
  6. Widget? labelBuilder(
    1. BuildContext context,
    2. PointConnection pointConnection,
    3. bool isHovering,
    4. bool isVisible,
    )?,
  7. bool? isMoving,
  8. bool? isLabelVisible,
  9. Offset? labelOffset,
  10. PointConnectionStyle? style,
  11. VoidCallback? onTap,
  12. VoidCallback? onHover,
})

Creates a new PointConnection instance with updated properties.

The start, end, label, labelTextStyle, id, labelBuilder, isMoving, isLabelVisible, labelOffset, style, onTap, and onHover parameters represent the updated properties of the connection.

Implementation

PointConnection copyWith({
  GlobeCoordinates? start,
  GlobeCoordinates? end,
  String? label,
  TextStyle? labelTextStyle,
  String? id,
  Widget? Function(BuildContext context, PointConnection pointConnection,
          bool isHovering, bool isVisible)?
      labelBuilder,
  bool? isMoving,
  bool? isLabelVisible,
  Offset? labelOffset,
  PointConnectionStyle? style,
  VoidCallback? onTap,
  VoidCallback? onHover,
}) {
  return PointConnection(
    start: start ?? this.start,
    end: end ?? this.end,
    label: label ?? this.label,
    labelOffset: labelOffset ?? this.labelOffset,
    labelBuilder: labelBuilder ?? this.labelBuilder,
    labelTextStyle: labelTextStyle ?? this.labelTextStyle,
    id: id ?? this.id,
    isMoving: isMoving ?? this.isMoving,
    isLabelVisible: isLabelVisible ?? this.isLabelVisible,
    style: style ?? this.style,
    onTap: onTap ?? this.onTap,
    onHover: onHover ?? this.onHover,
  );
}