copyWith method

ScatterTouchTooltipData copyWith({
  1. double? tooltipRoundedRadius,
  2. EdgeInsets? tooltipPadding,
  3. FLHorizontalAlignment? tooltipHorizontalAlignment,
  4. double? tooltipHorizontalOffset,
  5. double? maxContentWidth,
  6. GetScatterTooltipItems? getTooltipItems,
  7. bool? fitInsideHorizontally,
  8. bool? fitInsideVertically,
  9. double? rotateAngle,
  10. BorderSide? tooltipBorder,
  11. GetScatterTooltipColor? getTooltipColor,
})

Copies current ScatterTouchTooltipData to a new ScatterTouchTooltipData, and replaces provided values.

Implementation

ScatterTouchTooltipData copyWith({
  double? tooltipRoundedRadius,
  EdgeInsets? tooltipPadding,
  FLHorizontalAlignment? tooltipHorizontalAlignment,
  double? tooltipHorizontalOffset,
  double? maxContentWidth,
  GetScatterTooltipItems? getTooltipItems,
  bool? fitInsideHorizontally,
  bool? fitInsideVertically,
  double? rotateAngle,
  BorderSide? tooltipBorder,
  GetScatterTooltipColor? getTooltipColor,
}) {
  return ScatterTouchTooltipData(
    tooltipRoundedRadius: tooltipRoundedRadius ?? this.tooltipRoundedRadius,
    tooltipPadding: tooltipPadding ?? this.tooltipPadding,
    tooltipHorizontalAlignment:
        tooltipHorizontalAlignment ?? this.tooltipHorizontalAlignment,
    tooltipHorizontalOffset:
        tooltipHorizontalOffset ?? this.tooltipHorizontalOffset,
    maxContentWidth: maxContentWidth ?? this.maxContentWidth,
    getTooltipItems: getTooltipItems ?? this.getTooltipItems,
    fitInsideHorizontally:
        fitInsideHorizontally ?? this.fitInsideHorizontally,
    fitInsideVertically: fitInsideVertically ?? this.fitInsideVertically,
    rotateAngle: rotateAngle ?? this.rotateAngle,
    tooltipBorder: tooltipBorder ?? this.tooltipBorder,
    getTooltipColor: getTooltipColor ?? this.getTooltipColor,
  );
}