Created
May 9, 2024 15:23
-
-
Save aritra-tech/59c839a15066a258d2e6a4411d957a98 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun SliderExample() { | |
var value by remember { mutableFloatStateOf(4f) } | |
Column( | |
Modifier.fillMaxSize(), | |
horizontalAlignment = Alignment.CenterHorizontally, | |
verticalArrangement = Arrangement.Center | |
) { | |
InlineSlider( | |
value = value, | |
onValueChange = { value = it }, | |
increaseIcon = { Icon(InlineSliderDefaults.Increase, "Increase") }, | |
decreaseIcon = { Icon(InlineSliderDefaults.Decrease, "Decrease") }, | |
valueRange = 3f..6f, | |
steps = 5, | |
segmented = true | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment