HSlider
Class
Fields
axis: Axis
boxModifiers: WidgetStateProperty <Modifier Set>
controller: Slider Controller
enabled: bool
focusKey: Key
initialValue: float
onChanged: Action <float>
reverse: bool
scrollController: Scroll Controller
style: H Slider Style
thumbSize: float
Constructors
HSlider(scrollController: Scroll Controller, focusKey: Key, axis: Axis, reverse: bool, thumbSize: float, style: H Slider Style, boxModifiers: WidgetStateProperty <Modifier Set>, key: Key, constants: object[], modifiers: IReadOnlyCollection <Modifier>)
Creates a highly customizable scrolling slider widget based on the given
scrollController.Parameters
scrollController:
Scroll Controller - The scroll controller whose scroll position will be linked to the slider's value.
The slider will automatically update its value when the scroll position changes.focusKey:
Key - The key that will be used by the main interactive element of the button.
Can be used for focus management using GlobalKey.axis:
Axis - Sets the axis direction of the slider. Defaults to Axis.Vertical.reverse:
bool - Reverses the direction of the slider if true.thumbSize:
float - Sets the fixed size of the slider thumb. If smaller than 0, the thumb size will be calculated relative to the
size of the slider based on the controller's SliderController.ThumbRange.style:
H Slider Style - A predefined button style to change the visual appearance of the slider.
If not specified, the current PrimitiveTheme.Scrollbar theme will be used.boxModifiers:
WidgetStateProperty <Modifier Set> - Defines additional modifiers that will get applied to the slider's main interactive element.key:
Key - Passed on to Widget.key.constants:
object[] - Passed on to Widget.constants.modifiers:
IReadOnlyCollection <Modifier> - Passed on to Widget.modifiers.HSlider(controller: Slider Controller, focusKey: Key, axis: Axis, enabled: bool, reverse: bool, initialValue: float, thumbSize: float, onChanged: Action <float>, boxModifiers: WidgetStateProperty <Modifier Set>, style: H Slider Style, key: Key, constants: object[], modifiers: IReadOnlyCollection <Modifier>)
Creates a highly customizable slider widget that can be used for sliders and scrollbars.
Parameters
controller:
Slider Controller - The controller used to manage the slider's value and WidgetState.
If not specified, a controller will be created and managed by the slider's state.focusKey:
Key - The key that will be used by the main interactive element of the button.
Can be used for focus management using GlobalKey.axis:
Axis - Sets the axis direction of the slider. Defaults to Axis.Horizontal.enabled:
bool - Sets WidgetState.Disabled if no controller is specified.reverse:
bool - Reverses the direction of the slider if true.initialValue:
float - Sets the initial value if no controller is specified.thumbSize:
float - Sets the fixed size of the slider thumb. If smaller than 0, the thumb size will be calculated relative to the
size of the slider based on the controller's SliderController.ThumbRange.onChanged:
Action <float> - Sets the SliderController.onChanged action if no controller is specified.boxModifiers:
WidgetStateProperty <Modifier Set> - Defines additional modifiers that will get applied to the slider's main interactive element.style:
H Slider Style - A predefined button style to change the visual appearance of the slider.
If not specified, the current PrimitiveTheme.Slider theme will be used.key:
Key - Passed on to Widget.key.constants:
object[] - Passed on to Widget.constants.modifiers:
IReadOnlyCollection <Modifier> - Passed on to Widget.modifiers.Methods
Inherited Members
Extension Methods
To Diagnostics Node SafeIfClipConstDisplayExpandFillFlexibleMarginOpacityPaddingPositionedShrinkSizeStretchTight StretchTightVisibilityWith ModifierTo BuildableTo FactoryDescribe IdentityShort HashTo String Nullable