copyWith method
- @useResult
- FWidgetStateMap<
Color> ? color, - FWidgetStateMap<
Color> ? borderColor, - double? borderWidth,
- FFocusedOutlineStyle focusedOutlineStyle()?,
Returns a copy of this FSliderThumbStyle with the given properties replaced.
Where possible, it is strongly recommended to use the CLI to generate a style and directly modify the style.
color
The thumb's color.
Supported states:
borderColor
The border's color.
Supported states:
borderWidth
The border's width. Defaults to 2
.
Contract
Throws AssertionError if borderWidth
is not positive.
focusedOutlineStyle
The thumb's focused outline style.
Implementation
@useResult
FSliderThumbStyle copyWith({
FWidgetStateMap<Color>? color,
FWidgetStateMap<Color>? borderColor,
double? borderWidth,
FFocusedOutlineStyle Function(FFocusedOutlineStyle)? focusedOutlineStyle,
}) => FSliderThumbStyle(
color: color ?? this.color,
borderColor: borderColor ?? this.borderColor,
borderWidth: borderWidth ?? this.borderWidth,
focusedOutlineStyle: focusedOutlineStyle != null
? focusedOutlineStyle(this.focusedOutlineStyle)
: this.focusedOutlineStyle,
);