Slider class
A widget for selecting a numeric value by sliding a thumb along a track.
Constructors
- Slider({required double value, required double min, required double max, SliderAxis axis = SliderAxis.horizontal, Style trackStyle = const Style(foreground: CharmColors.iron), Style thumbStyle = const Style(modifiers: Modifier.bold), String thumbChar = '█', String trackChar = '─', void onChanged(double value)?})
- Creates a slider.
Properties
- axis → SliderAxis
-
The orientation of the slider.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
The optional key for this widget.
finalinherited
- max → double
-
The maximum value.
final
- min → double
-
The minimum value.
final
- onChanged → void Function(double value)?
-
Callback when the value changes.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- thumbChar → String
-
The character used for the thumb.
final
- thumbStyle → Style
-
The style for the thumb.
final
- trackChar → String
-
The character used for the track.
final
- trackStyle → Style
-
The style for the track.
final
- value ↔ double
-
The current value.
getter/setter pair
Methods
-
createElement(
) → Element -
Creates an Element to manage this widget's location in the tree.
inherited
-
getIntrinsicHeight(
int width) → int -
Computes the intrinsic height of this widget under the given
widthconstraint.inherited -
handleKeyEvent(
KeyEvent event) → void - Handles keyboard events for moving the slider.
-
handleMouseEvent(
MouseEvent event, int localX, int localY, Rect area) → void - Handles mouse events for dragging the slider thumb.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
render(
Buffer buffer, Rect area) → void -
Renders the widget onto the provided
bufferwithin the specifiedarea.override -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited