Kmp Wheel Picker
fun <T : Any> KmpWheelPicker(selectedIndex: Int, items: List<T>, itemKey: (T, Int) -> Any = { _, index -> index }, state: KmpWheelPickerState = rememberKmpWheelPickerState(isInfinite = false, initiallySelectedItemIndex = selectedIndex), modifier: Modifier = Modifier, isEnabled: Boolean = true, onChange: (T) -> Unit, onImmediateChange: (T) -> Unit = {}, scrollEffect: KmpWheelPickerScrollEffect = remember { KmpWheelPickerScrollEffects.magnify() }, horizontalAlignment: Alignment.Horizontal = Alignment.Start, indicator: KmpWheelPickerIndicator = remember { KmpWheelPickerIndicators.window() }, content: @Composable LazyItemScope.(T) -> Unit)
KmpWheelPicker a cross-platform wheel picker.
Parameters
selected Index
The index of the current value
items
The list of items for the picker to display
item Key
A factory of stable and unique keys representing the item
state
The state for the picker
modifier
The Compose Modifier for KmpWheelPicker
is Enabled
Enables or disables user interaction with the picker
on Change
Callback for when the picker fully settles on a value
on Immediate Change
Callback for any time a new value passes through the indication window. It is not recommended to change the value with this callback. It can instead be used for reacting quickly to value changes
scroll Effect
The effect applied to items as they scroll
indicator
The indicator for the current selection
content
The content for each item
Note: All items must be the same height.