FlutterSlider class
Constructors
-
FlutterSlider({Key? key, double? min, double? max, required List<double> values, List<FlutterSliderFixedValue>? fixedValues, Axis axis = Axis.horizontal, FlutterSliderHandler? handler, FlutterSliderHandler? rightHandler, double? handlerHeight, double? handlerWidth, dynamic onDragStarted(int handlerIndex, dynamic lowerValue, dynamic upperValue)?, dynamic onDragCompleted(int handlerIndex, dynamic lowerValue, dynamic upperValue)?, dynamic onDragging(int handlerIndex, dynamic lowerValue, dynamic upperValue)?, bool rangeSlider = false, bool rtl = false, bool jump = false, List<FlutterSliderIgnoreSteps> ignoreSteps = const [], bool disabled = false, double? touchSize, bool visibleTouchArea = false, double minimumDistance = 0, double maximumDistance = 0, FlutterSliderTooltip? tooltip, FlutterSliderTrackBar trackBar = const FlutterSliderTrackBar(), FlutterSliderHandlerAnimation handlerAnimation = const FlutterSliderHandlerAnimation(), bool selectByTap = true, FlutterSliderStep step = const FlutterSliderStep(), FlutterSliderHatchMark? hatchMark, bool centeredOrigin = false, bool lockHandlers = false, double? lockDistance, BoxDecoration? decoration, BoxDecoration? foregroundDecoration, double containerHeightFactor = 2})
-
Properties
-
axis
→ Axis
-
The axis on which the slider should be displayed. Can be either vertical or horizontal.
final
-
centeredOrigin
→ bool
-
Determines whether the slider should be centered at the origin of the slider axis.
final
-
containerHeightFactor
→ double
-
This factor is timesed by the height of the height of the slider. It must be greater than 0.
final
-
decoration
→ BoxDecoration?
-
The decoration to apply to the slider.
final
-
disabled
→ bool
-
Determines whether the slider should be disabled.
final
-
fixedValues
→ List<FlutterSliderFixedValue>?
-
A list of fixed values that can be selected on the slider.
final
-
foregroundDecoration
→ BoxDecoration?
-
The foreground decoration to apply to the slider.
final
-
handler
→ FlutterSliderHandler?
-
The custom handler widget to use for the left handler.
final
-
handlerAnimation
→ FlutterSliderHandlerAnimation
-
The animation settings for the slider handlers.
final
-
handlerHeight
→ double?
-
The height of the slider handler.
final
-
handlerWidth
→ double?
-
The width of the slider handler.
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
hatchMark
→ FlutterSliderHatchMark?
-
The settings for the slider hatch mark.
final
-
ignoreSteps
→ List<FlutterSliderIgnoreSteps>
-
A list of values that should be ignored when snapping to fixed values.
final
-
jump
→ bool
-
Determines whether the slider should snap to fixed values.
final
-
key
→ Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
lockDistance
→ double?
-
The maximum distance between the two handles to lock the handles together.
final
-
lockHandlers
→ bool
-
Determines whether the handles should be locked together when dragging.
final
-
max
→ double?
-
The maximum value that can be selected on the slider.
final
-
maximumDistance
→ double
-
The maximum distance between the two handles of a range slider.
final
-
min
→ double?
-
The minimum value that can be selected on the slider.
final
-
minimumDistance
→ double
-
The minimum distance between the two handles of a range slider.
final
-
onDragCompleted
→ (dynamic Function(int handlerIndex, dynamic lowerValue, dynamic upperValue)?)
-
Callback function that is called when the user stops dragging one of the handlers.
final
-
onDragging
→ (dynamic Function(int handlerIndex, dynamic lowerValue, dynamic upperValue)?)
-
Callback function that is called while the user is dragging one of the handlers.
final
-
onDragStarted
→ (dynamic Function(int handlerIndex, dynamic lowerValue, dynamic upperValue)?)
-
Callback function that is called when the user starts dragging one of the handlers.
final
-
rangeSlider
→ bool
-
Determines whether this is a range slider or a single-value slider.
final
-
rightHandler
→ FlutterSliderHandler?
-
The custom handler widget to use for the right handler, if this is a range slider.
final
-
rtl
→ bool
-
Determines whether the slider should be displayed right-to-left.
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
selectByTap
→ bool
-
Determines whether a tap on the slider should set the nearest handle to that position.
final
-
step
→ FlutterSliderStep
-
The settings for the slider step.
final
-
tooltip
→ FlutterSliderTooltip?
-
The settings for the slider tooltip.
final
-
touchSize
→ double?
-
The size of the touch area for each handler.
final
-
trackBar
→ FlutterSliderTrackBar
-
The settings for the slider track bar.
final
-
values
→ List<double>
-
The initial values for the slider handles. If the slider is a range slider, this should be a list with two values.
final
-
visibleTouchArea
→ bool
-
Determines whether the touch area for each handler should be visible.
final