copyWith method
PointConnection
copyWith({
- GlobeCoordinates? start,
- GlobeCoordinates? end,
- Offset? labelOffset,
- double? curveScale,
- String? label,
- TextStyle? labelTextStyle,
- String? id,
- Widget? labelBuilder(
- BuildContext context,
- PointConnection pointConnection,
- bool isHovering,
- bool isVisible,
- bool? isMoving,
- bool? isLabelVisible,
- PointConnectionStyle? style,
- VoidCallback? onTap,
- VoidCallback? onHover,
- double? animationOffset,
- 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,
);
}