copyWith method
Creates a copy of this bubble data point with the given fields replaced.
Returns a new BubbleDataPoint with the same values as this one, except for the fields that are explicitly provided.
Implementation
@override
BubbleDataPoint copyWith({
double? x,
double? y,
double? size,
String? label,
bool? showValue,
}) {
return BubbleDataPoint(
x: x ?? this.x,
y: y ?? this.y,
size: size ?? this.size,
label: label ?? this.label,
showValue: showValue ?? this.showValue,
);
}