copyWith method
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,
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,
}) {
return 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,
);
}