Skip to content

Instantly share code, notes, and snippets.

@aritra-tech
Created May 9, 2024 15:22
Show Gist options
  • Save aritra-tech/471ed466de622add88e66a763c0ccc0b to your computer and use it in GitHub Desktop.
Save aritra-tech/471ed466de622add88e66a763c0ccc0b to your computer and use it in GitHub Desktop.
@Composable
fun SteppersExample() {
var value by remember { mutableIntStateOf(2) }
Column(
Modifier.fillMaxSize(),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center
) {
Stepper(
value = value,
onValueChange = { value = it },
increaseIcon = { Icon(StepperDefaults.Increase, "Increase") },
decreaseIcon = { Icon(StepperDefaults.Decrease, "Decrease") },
valueProgression = 0..10
) { Text("Value: $value") }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment