copyWith method

BarTouchData copyWith({
  1. bool? enabled,
  2. BaseTouchCallback<BarTouchResponse>? touchCallback,
  3. MouseCursorResolver<BarTouchResponse>? mouseCursorResolver,
  4. Duration? longPressDuration,
  5. BarTouchTooltipData? touchTooltipData,
  6. EdgeInsets? touchExtraThreshold,
  7. bool? allowTouchBarBackDraw,
  8. bool? handleBuiltInTouches,
})

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

Implementation

BarTouchData copyWith({
  bool? enabled,
  BaseTouchCallback<BarTouchResponse>? touchCallback,
  MouseCursorResolver<BarTouchResponse>? mouseCursorResolver,
  Duration? longPressDuration,
  BarTouchTooltipData? touchTooltipData,
  EdgeInsets? touchExtraThreshold,
  bool? allowTouchBarBackDraw,
  bool? handleBuiltInTouches,
}) {
  return BarTouchData(
    enabled: enabled ?? this.enabled,
    touchCallback: touchCallback ?? this.touchCallback,
    mouseCursorResolver: mouseCursorResolver ?? this.mouseCursorResolver,
    longPressDuration: longPressDuration ?? this.longPressDuration,
    touchTooltipData: touchTooltipData ?? this.touchTooltipData,
    touchExtraThreshold: touchExtraThreshold ?? this.touchExtraThreshold,
    allowTouchBarBackDraw:
        allowTouchBarBackDraw ?? this.allowTouchBarBackDraw,
    handleBuiltInTouches: handleBuiltInTouches ?? this.handleBuiltInTouches,
  );
}