Slider class

A widget for selecting a numeric value by sliding a thumb along a track.

Inheritance
Implemented types

Constructors

Slider({Key? key, required double value, required double min, required double max, bool focused = false, 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
focused → bool
Whether the slider is focused.
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
createState() → State<Slider>
Creates the mutable state for this widget at a given location in the tree.
override
getIntrinsicHeight(int width) → int
Computes the intrinsic height of this widget under the given width constraint.
inherited
getIntrinsicWidth(int height) → int
Computes the intrinsic width of this widget under the given height constraint.
inherited
handleKeyEvent(KeyEvent event) → bool
Handles a keyboard event, returning true if the event was consumed.
override
handleMouseEvent(MouseEvent event, int localX, int localY, Rect area) → void
Handles mouse events for dragging the slider thumb.
override
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.
inherited