package com.dong.maxhap.demos.material

import androidx.compose.ui.Modifier
import androidx.compose.material.*
import androidx.compose.runtime.*
import androidx.compose.ui.unit.dp
import androidx.compose.foundation.layout.*

@Composable
internal fun SliderSample() {
    var value by remember { mutableStateOf(0.5f) }
    Column(Modifier.padding(12.dp)) {
        Text("当前值: ${kotlin.math.round(value * 10.0f) / 10.0f}")
        Slider(value = value, onValueChange = { value = it }, valueRange = 0f..1f, steps = 4)
    }
}
