FluentSliderStyle class
The visual configuration of a FluentSlider.
Shaped exactly like FluentButtonStyle: every visual property is a
WidgetStateProperty, so hover, pressed and disabled values live on the
property rather than being branched on at build time.
A slider is painted rather than composed — there is no DecoratedBox to
read a colour back from — so this struct is also the component's observable
surface. FluentSliderPainter takes every one of these values as a public
field for the same reason.
Every field is nullable and means "inherit". Resolution order, lowest to highest precedence:
- the size defaults derived from the theme
- the nearest
FluentSliderTheme - the widget's own
style
- Annotations
Constructors
-
FluentSliderStyle({WidgetStateProperty<
Color?> ? railColor, WidgetStateProperty<Color?> ? progressColor, WidgetStateProperty<Color?> ? stepColor, WidgetStateProperty<Color?> ? thumbColor, WidgetStateProperty<Color?> ? thumbInnerColor, WidgetStateProperty<Color?> ? thumbBorderColor, WidgetStateProperty<double?> ? railThickness, WidgetStateProperty<double?> ? railInset, WidgetStateProperty<BorderRadius?> ? railRadius, WidgetStateProperty<double?> ? thumbSize, WidgetStateProperty<double?> ? thumbInnerRadius, WidgetStateProperty<double?> ? thumbBorderWidth, WidgetStateProperty<Size?> ? minimumSize, WidgetStateProperty<MouseCursor?> ? mouseCursor}) -
Creates a style. Omitted properties inherit.
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
-
minimumSize
→ WidgetStateProperty<
Size?> ? -
Minimum size of the whole control.
final
-
mouseCursor
→ WidgetStateProperty<
MouseCursor?> ? -
Cursor while hovering.
final
-
progressColor
→ WidgetStateProperty<
Color?> ? -
The filled part of the rail, from the minimum up to the thumb.
Upstream's
sliderProgressColorVar.final -
railColor
→ WidgetStateProperty<
Color?> ? -
The unfilled part of the rail. Upstream's
sliderRailColorVar.final -
railInset
→ WidgetStateProperty<
double?> ? -
How far the rail stops short of each end of the control.
final
-
railRadius
→ WidgetStateProperty<
BorderRadius?> ? -
Rail corner radius.
final
-
railThickness
→ WidgetStateProperty<
double?> ? -
Rail height.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stepColor
→ WidgetStateProperty<
Color?> ? -
The tick marks a stepped slider draws across the rail.
final
-
thumbBorderColor
→ WidgetStateProperty<
Color?> ? -
The thumb's outline.
final
-
thumbBorderWidth
→ WidgetStateProperty<
double?> ? -
Thumb outline width.
final
-
thumbColor
→ WidgetStateProperty<
Color?> ? -
The thumb's centre disc. Upstream's
sliderThumbColorVar.final -
thumbInnerColor
→ WidgetStateProperty<
Color?> ? -
The ring between thumbColor and thumbBorderColor.
final
-
thumbInnerRadius
→ WidgetStateProperty<
double?> ? -
Radius of the thumb's centre disc.
final
-
thumbSize
→ WidgetStateProperty<
double?> ? -
Thumb diameter, outline included.
final
Methods
-
copyWith(
{WidgetStateProperty< Color?> ? railColor, WidgetStateProperty<Color?> ? progressColor, WidgetStateProperty<Color?> ? stepColor, WidgetStateProperty<Color?> ? thumbColor, WidgetStateProperty<Color?> ? thumbInnerColor, WidgetStateProperty<Color?> ? thumbBorderColor, WidgetStateProperty<double?> ? railThickness, WidgetStateProperty<double?> ? railInset, WidgetStateProperty<BorderRadius?> ? railRadius, WidgetStateProperty<double?> ? thumbSize, WidgetStateProperty<double?> ? thumbInnerRadius, WidgetStateProperty<double?> ? thumbBorderWidth, WidgetStateProperty<Size?> ? minimumSize, WidgetStateProperty<MouseCursor?> ? mouseCursor}) → FluentSliderStyle - This style with the given properties replaced.
-
merge(
FluentSliderStyle? other) → FluentSliderStyle -
This style with the non-null properties of
otherlayered on top. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
from(
{Color? railColor, Color? progressColor, Color? stepColor, Color? thumbColor, Color? thumbInnerColor, Color? thumbBorderColor, double? railThickness, double? railInset, BorderRadius? railRadius, double? thumbSize, double? thumbInnerRadius, double? thumbBorderWidth, Size? minimumSize, MouseCursor? mouseCursor}) → FluentSliderStyle - Convenience for the common case of one value across every state.