Set Picker
fun <T> SetPicker(current: T, dataList: List<T>, modifier: Modifier = Modifier, textStyle: TextStyle = LocalTextStyle.current, arrowsColor: Color = MaterialTheme.colorScheme.primary, dataToString: @Composable (T) -> String = { it.toString() }, onStateChanged: (T) -> Unit = {})(source)
A Compose picker component that allows users to select an item from a list by dragging or using arrow buttons.
Parameters
current
The currently selected item
data List
The list of items to choose from
modifier
The modifier to be applied to the picker
text Style
The text style for displaying items
arrows Color
The color of the up/down arrow buttons
data To String
A composable function to convert items to strings for display. Defaults to Any.toString
on State Changed
Callback invoked when the selected item changes
Type Parameters
T
The type of items in the list