MultiSlider class

Inheritance

Constructors

MultiSlider({required List<double> values, required ValueChanged<List<double>>? onChanged, double max = 1, double min = 0, ValueChanged<List<double>>? onChangeStart, ValueChanged<List<double>>? onChangeEnd, Color? color, List<Color>? rangeColors, Color? thumbColor, Color? thumbInactiveColor = Colors.grey, double thumbRadius = 10, double horizontalPadding = 26.0, double height = 45, double activeTrackSize = 6, double inactiveTrackSize = 4, IndicatorBuilder? indicator, IndicatorBuilder? selectedIndicator = defaultIndicator, int? divisions, ThumbBuilder thumbBuilder = defaultThumbBuilder, TrackbarBuilder trackbarBuilder = defaultTrackbarBuilder, TextDirection textDirection = TextDirection.ltr, double textHeightOffset = 30, Key? key})
const

Properties

activeTrackSize double
Active track size.
final
color Color?
Bar and indicators active color.
final
divisions int?
Number of divisions for discrete Slider.
final
hashCode int
The hash code for this object.
no setterinherited
height double
MultiSlider vertical dimension. Used by GestureDetector and CustomPainter.
final
horizontalPadding double
Empty space between the MultiSlider bar and the end of GestureDetector zone.
final
inactiveTrackSize double
Inactive track size.
final
indicator IndicatorBuilder?
Default indicator builder. Used to draw values, even if user is not interacting with this component. This is null by default, so you have to use defaultIndicator or define your own if you want to display values.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
max double
MultiSlider maximum value.
final
min double
MultiSlider minimum value.
final
onChanged ValueChanged<List<double>>?
Callback for every user slide gesture.
final
onChangeEnd ValueChanged<List<double>>?
Callback for every time user stop click/slide on this widget.
final
onChangeStart ValueChanged<List<double>>?
Callback for every time user click on this widget.
final
range double
Difference between max and min. Must be positive!
final
rangeColors List<Color>?
Bar range colors from left to right. Your choice here will be displayed unconditionally! If you want more control, use trackbarBuilder instead!
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedIndicator IndicatorBuilder?
Selected indicator builder. Used to draw only the selected value. defaultIndicator is used by default. You can define your own or set null to not draw anything. If indicator is set and selectedIndicator is null, then indicator will be used to draw selected value indicator.
final
textDirection TextDirection
TextDirection used on indicator and selectedIndicator drawing.
final
textHeightOffset double
Height offset used in indicator and selectedIndicator.
final
thumbBuilder ThumbBuilder
Use to set custom color, elevation and radius for each thumb indicator individually.
final
thumbColor Color?
Thumb color.
final
thumbInactiveColor Color?
Thumb inactive color.
final
thumbRadius double
Thumb radius.
final
trackbarBuilder TrackbarBuilder
Used to setup ranges draw. For a simplified use, try rangeColors. Run from left to right for each ValueRange. Return TrackbarOptions where you setup if the current track is active or not. You can override its size or Color by passing a color different from null.
final
values List<double>
List of ordered values which will be changed by user gestures with this widget.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _MultiSliderState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited