PickerGroupScope
Class
Android
public class PickerGroupScope
Functions
@Composable
public fun PickerGroupItem(
pickerState: PickerState,
selected: Boolean,
onSelected: () -> Unit,
modifier: Modifier = Modifier,
contentDescription: (() -> String)? = null,
focusRequester: FocusRequester? = null,
readOnlyLabel: @Composable (BoxScope.() -> Unit)? = null,
verticalSpacing: Dp = 0.dp,
option: @Composable PickerScope.(optionIndex: Int, pickerSelected: Boolean) -> Unit,
)
A Picker
in a PickerGroup
Parameters
pickerState | The state of the picker. |
selected | If the Picker is selected. |
onSelected | Action triggered when the Picker is selected by clicking. |
modifier | Modifier to be applied to the Picker . |
contentDescription | A block which computes text used by accessibility services to describe what the selected option represents. This text should be localized, such as by using androidx.compose.ui.res.stringResource or similar. |
focusRequester | Optional FocusRequester for the Picker . If not provided, a local instance of FocusRequester will be created to handle the focus between different pickers. If it is provided, the caller is responsible for handling the focus. |
verticalSpacing | The amount of vertical spacing in Dp between items. Can be negative, which can be useful for Text if it has plenty of whitespace. |
readOnlyLabel | A slot for providing a label, displayed above the selected option when the Picker is read-only. The label is overlaid with the currently selected option within a Box, so it is recommended that the label is given Alignment.TopCenter . |
option | A block which describes the content. The integer parameter to the composable denotes the index of the option and boolean denotes whether the picker is selected or not. |