copyWith method
- @useResult
- FWidgetStateMap<
Color> ? tickColor, - double? tickSize,
- FWidgetStateMap<
TextStyle> ? labelTextStyle, - AlignmentGeometry? labelAnchor,
- double? labelOffset,
Returns a copy of this FSliderMarkStyle with the given properties replaced.
Where possible, it is strongly recommended to use the CLI to generate a style and directly modify the style.
tickColor
The tick's color.
Supported states:
tickSize
The tick's size. Defaults to 3.
Contract
Throws AssertionError if it is not positive.
labelTextStyle
The label's default text style.
Supported states:
labelAnchor
The label's anchor to which the labelOffset
is applied.
labelOffset
The label's offset from the slider, along its cross axis, in logical pixels. The top-left corner is always the origin, regardless of the layout.
For example, if the layout is FLayout.ltr and the cross axis offset is 3, the label will be 3 pixels below the slider's edge.
|--------------------------|
|----------[tick]----------|
|__________________________|
(1)
(2)
(3)
[label]
Given the same layout, if the cross axis offset is -3, the label will be 3 pixels above the slider's edge.
[label]
(3)
(2)
(1)
|--------------------------|
|----------[tick]----------|
|__________________________|
Implementation
@useResult
FSliderMarkStyle copyWith({
FWidgetStateMap<Color>? tickColor,
double? tickSize,
FWidgetStateMap<TextStyle>? labelTextStyle,
AlignmentGeometry? labelAnchor,
double? labelOffset,
}) => FSliderMarkStyle(
tickColor: tickColor ?? this.tickColor,
tickSize: tickSize ?? this.tickSize,
labelTextStyle: labelTextStyle ?? this.labelTextStyle,
labelAnchor: labelAnchor ?? this.labelAnchor,
labelOffset: labelOffset ?? this.labelOffset,
);