copyWith method

  1. @override
BubbleDataPoint copyWith({
  1. double? x,
  2. double? y,
  3. double? size,
  4. String? label,
  5. bool? showValue,
})
override

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,
  );
}