copyWith method
- @useResult
- DecorationDelta? decoration,
- ImageFilter? backgroundFilter = Sentinels.imageFilter,
- EdgeInsetsDelta? padding,
- TextStyleDelta? textStyle,
- Future<
void> hapticFeedback()?, - FTooltipMotionDelta? motion,
- Duration? hoverEnterDuration,
- Duration? hoverExitDuration,
- Duration? longPressExitDuration,
Returns a copy of this FTooltipStyle with the given properties replaced.
See customizing widget styles.
Parameters
- FTooltipStyle.decoration - The box decoration.
- FTooltipStyle.backgroundFilter - An optional background filter applied to the tooltip.
- FTooltipStyle.padding - The padding surrounding the tooltip's text.
- FTooltipStyle.textStyle - The tooltip's default text style.
- FTooltipStyle.hapticFeedback - The haptic feedback for when the tooltip is shown via long press.
- FTooltipStyle.motion - The tooltip's motion configuration.
- FTooltipStyle.hoverEnterDuration - The duration to wait before showing the tooltip after the user hovers over the target.
- FTooltipStyle.hoverExitDuration - The duration to wait before hiding the tooltip after the user has stopped hovering over the target.
- FTooltipStyle.longPressExitDuration - The duration to wait before hiding the tooltip after the user has stopped pressing the target.
Implementation
@useResult
FTooltipStyle copyWith({
DecorationDelta? decoration,
ImageFilter? backgroundFilter = Sentinels.imageFilter,
EdgeInsetsDelta? padding,
TextStyleDelta? textStyle,
Future<void> Function()? hapticFeedback,
FTooltipMotionDelta? motion,
Duration? hoverEnterDuration,
Duration? hoverExitDuration,
Duration? longPressExitDuration,
}) => .new(
decoration: decoration?.call(this.decoration) ?? this.decoration,
backgroundFilter: backgroundFilter == Sentinels.imageFilter ? this.backgroundFilter : backgroundFilter,
padding: padding?.call(this.padding) ?? this.padding,
textStyle: textStyle?.call(this.textStyle) ?? this.textStyle,
hapticFeedback: hapticFeedback ?? this.hapticFeedback,
motion: motion?.call(this.motion) ?? this.motion,
hoverEnterDuration: hoverEnterDuration ?? this.hoverEnterDuration,
hoverExitDuration: hoverExitDuration ?? this.hoverExitDuration,
longPressExitDuration: longPressExitDuration ?? this.longPressExitDuration,
);