CenteredTrack

@Composable
fun CenteredTrack(sliderState: SliderState, modifier: Modifier = Modifier, enabled: Boolean = true, colors: SliderColors = colors(), drawStopIndicator: DrawScope.(Offset) -> Unit? = { drawStopIndicator( offset = it, color = colors.trackColor(enabled, active = true), size = TrackStopIndicatorSize, ) }, drawTick: DrawScope.(Offset, Color) -> Unit = { offset, color -> drawStopIndicator(offset = offset, color = color, size = TickSize) }, thumbTrackGapSize: Dp = ThumbTrackGapSize, trackInsideCornerSize: Dp = TrackInsideCornerSize, trackCornerSize: Dp = Dp.Unspecified)

The Default centered track for Slider and VerticalSlider

This track starts from the center of the slider.

Parameters

sliderState

SliderState which is used to obtain the current active track.

modifier

the Modifier to be applied to the track.

enabled

controls the enabled state of this slider. When false, this component will not respond to user input, and it will appear visually disabled and disabled to accessibility services.

colors

SliderColors that will be used to resolve the colors used for this track in different states. See SliderDefaults.colors.

drawStopIndicator

lambda that will be called to draw the stop indicator at the end of the track.

drawTick

lambda that will be called to draw the ticks if steps are greater than 0.

thumbTrackGapSize

size of the gap between the thumb and the track.

trackInsideCornerSize

size of the corners towards the thumb when a gap is set.

trackCornerSize

size of the external corners.