copyWith method

ScatterTouchData copyWith({
  1. bool? enabled,
  2. BaseTouchCallback<ScatterTouchResponse>? touchCallback,
  3. MouseCursorResolver<ScatterTouchResponse>? mouseCursorResolver,
  4. Duration? longPressDuration,
  5. ScatterTouchTooltipData? touchTooltipData,
  6. double? touchSpotThreshold,
  7. bool? handleBuiltInTouches,
})

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

Implementation

ScatterTouchData copyWith({
  bool? enabled,
  BaseTouchCallback<ScatterTouchResponse>? touchCallback,
  MouseCursorResolver<ScatterTouchResponse>? mouseCursorResolver,
  Duration? longPressDuration,
  ScatterTouchTooltipData? touchTooltipData,
  double? touchSpotThreshold,
  bool? handleBuiltInTouches,
}) {
  return ScatterTouchData(
    enabled: enabled ?? this.enabled,
    touchCallback: touchCallback ?? this.touchCallback,
    mouseCursorResolver: mouseCursorResolver ?? this.mouseCursorResolver,
    longPressDuration: longPressDuration ?? this.longPressDuration,
    touchTooltipData: touchTooltipData ?? this.touchTooltipData,
    handleBuiltInTouches: handleBuiltInTouches ?? this.handleBuiltInTouches,
    touchSpotThreshold: touchSpotThreshold ?? this.touchSpotThreshold,
  );
}