copyWith method

LineTouchData copyWith({
  1. bool? enabled,
  2. BaseTouchCallback<LineTouchResponse>? touchCallback,
  3. MouseCursorResolver<LineTouchResponse>? mouseCursorResolver,
  4. Duration? longPressDuration,
  5. LineTouchTooltipData? touchTooltipData,
  6. GetTouchedSpotIndicator? getTouchedSpotIndicator,
  7. double? touchSpotThreshold,
  8. CalculateTouchDistance? distanceCalculator,
  9. GetTouchLineY? getTouchLineStart,
  10. GetTouchLineY? getTouchLineEnd,
  11. bool? handleBuiltInTouches,
})

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

Implementation

LineTouchData copyWith({
  bool? enabled,
  BaseTouchCallback<LineTouchResponse>? touchCallback,
  MouseCursorResolver<LineTouchResponse>? mouseCursorResolver,
  Duration? longPressDuration,
  LineTouchTooltipData? touchTooltipData,
  GetTouchedSpotIndicator? getTouchedSpotIndicator,
  double? touchSpotThreshold,
  CalculateTouchDistance? distanceCalculator,
  GetTouchLineY? getTouchLineStart,
  GetTouchLineY? getTouchLineEnd,
  bool? handleBuiltInTouches,
}) =>
    LineTouchData(
      enabled: enabled ?? this.enabled,
      touchCallback: touchCallback ?? this.touchCallback,
      mouseCursorResolver: mouseCursorResolver ?? this.mouseCursorResolver,
      longPressDuration: longPressDuration ?? this.longPressDuration,
      touchTooltipData: touchTooltipData ?? this.touchTooltipData,
      getTouchedSpotIndicator:
          getTouchedSpotIndicator ?? this.getTouchedSpotIndicator,
      touchSpotThreshold: touchSpotThreshold ?? this.touchSpotThreshold,
      distanceCalculator: distanceCalculator ?? this.distanceCalculator,
      getTouchLineStart: getTouchLineStart ?? this.getTouchLineStart,
      getTouchLineEnd: getTouchLineEnd ?? this.getTouchLineEnd,
      handleBuiltInTouches: handleBuiltInTouches ?? this.handleBuiltInTouches,
    );