copyWith method
ChartInteractionResult
copyWith({
- ChartDataPoint? point,
- PieData? segment,
- int? datasetIndex,
- int? elementIndex,
- bool? isHit,
Creates a copy of this result with the given fields replaced.
Returns a new ChartInteractionResult with the same values as this one, except for the fields that are explicitly provided.
Implementation
ChartInteractionResult copyWith({
ChartDataPoint? point,
PieData? segment,
int? datasetIndex,
int? elementIndex,
bool? isHit,
}) {
return ChartInteractionResult(
point: point ?? this.point,
segment: segment ?? this.segment,
datasetIndex: datasetIndex ?? this.datasetIndex,
elementIndex: elementIndex ?? this.elementIndex,
isHit: isHit ?? this.isHit,
);
}