copyWith method
- @useResult
- FWidgetStateMap<
MouseCursor> ? cursor, - Duration? pressedEnterDuration,
- Duration? pressedExitDuration,
- Duration? bounceDownDuration,
- Duration? bounceUpDuration,
- Curve? bounceDownCurve,
- Curve? bounceUpCurve,
- Tween<
double> ? bounceTween,
Returns a copy of this FTappableStyle with the given properties replaced.
Where possible, it is strongly recommended to use the CLI to generate a style and directly modify the style.
cursor
The mouse cursor for mouse pointers that are hovering over the region. Defaults to MouseCursor.defer.
pressedEnterDuration
The duration to wait before applying the pressed effect after the user presses the tile. Defaults to 200ms.
pressedExitDuration
The duration to wait before removing the pressed effect after the user stops pressing the tile. Defaults to 0s.
bounceDownDuration
The bounce's animation duration when the tappable is pressed down. Defaults to 100ms.
bounceUpDuration
The bounce's animation duration when the tappable is released (up). Defaults to 120ms.
bounceDownCurve
The curve used to animate the scale of the tappable when pressed (down). Defaults to Curves.easeOutQuart.
bounceUpCurve
The curve used to animate the scale of the tappable when released (up). Defaults to Curves.easeOutCubic.
bounceTween
The tween used to animate the scale of the tappable. Defaults to defaultBounceTween.
Set to noBounceTween to disable the bounce effect.
Implementation
@useResult
FTappableStyle copyWith({
FWidgetStateMap<MouseCursor>? cursor,
Duration? pressedEnterDuration,
Duration? pressedExitDuration,
Duration? bounceDownDuration,
Duration? bounceUpDuration,
Curve? bounceDownCurve,
Curve? bounceUpCurve,
Tween<double>? bounceTween,
}) => FTappableStyle(
cursor: cursor ?? this.cursor,
pressedEnterDuration: pressedEnterDuration ?? this.pressedEnterDuration,
pressedExitDuration: pressedExitDuration ?? this.pressedExitDuration,
bounceDownDuration: bounceDownDuration ?? this.bounceDownDuration,
bounceUpDuration: bounceUpDuration ?? this.bounceUpDuration,
bounceDownCurve: bounceDownCurve ?? this.bounceDownCurve,
bounceUpCurve: bounceUpCurve ?? this.bounceUpCurve,
bounceTween: bounceTween ?? this.bounceTween,
);