SingleChoiceDialog

fun <T> SingleChoiceDialog(title: String, options: List<T>, initialSelection: T, optionLabel: (T) -> String, onDismissRequest: () -> Unit, onConfirm: (T) -> Unit, modifier: Modifier = Modifier, optionDescription: (T) -> String?? = null, onOptionLinkClick: (T) -> Unit? = null, applyOnSelect: Boolean = false)

Radio-button picker hosted in an AlertDialog so the option list scrolls while the action buttons stay pinned, which keeps the dialog usable on a phone in landscape.

Parameters

onOptionLinkClick

when non-null, every option gets a trailing link button that passes the option back; leave it null for options that have nothing to link to.

applyOnSelect

when true, tapping an option calls onConfirm right away and the dialog stays open with a single dismiss button. When false, the selection is local until the user presses the confirm button.