copyWith method

BubbleDataSet copyWith({
  1. Color? color,
  2. List<BubbleDataPoint>? dataPoints,
})

Creates a copy of this bubble data set with the given fields replaced.

Returns a new BubbleDataSet with the same values as this one, except for the fields that are explicitly provided.

Implementation

BubbleDataSet copyWith({Color? color, List<BubbleDataPoint>? dataPoints}) {
  return BubbleDataSet(
    color: color ?? this.color,
    dataPoints: dataPoints ?? this.dataPoints,
  );
}