KmpWheelPicker

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

selectedIndex

The index of the current value

items

The list of items for the picker to display

itemKey

A factory of stable and unique keys representing the item

state

The state for the picker

modifier

The Compose Modifier for KmpWheelPicker

isEnabled

Enables or disables user interaction with the picker

onChange

Callback for when the picker fully settles on a value

onImmediateChange

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

scrollEffect

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.