copyWith method

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

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

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