API reference

ChoiceListDialogItem Class

Represents an item in a choice-list dialog.
Data-class equality includes composable content by reference. Use ChoiceListDialogItem.key for stable selection and list identity rather than comparing whole items.

Signature

@Immutable
data class ChoiceListDialogItem(
    val title: String,
    val key: String = title,
    val subtitle: String? = null,
    val enabled: Boolean = true,
    val leadingIcon: @Composable () -> Unit? = null,
)

Constructors

ChoiceListDialogItem ( title , key , subtitle , enabled , leadingIcon )
Signature
constructor(
    title: String,
    key: String = title,
    subtitle: String? = null,
    enabled: Boolean = true,
    leadingIcon: @Composable () -> Unit? = null,
)
Parameters
title: String  The title text of the item.
key: String  Stable selection identity. Set this explicitly when multiple items share a title.
subtitle: String?  The subtitle text of the item.
enabled: Boolean  Indicates whether the item is enabled or not. Defaults to true.
leadingIcon: (@Composable () -> Unit)?  Optional content displayed before the labels.
Returns
ChoiceListDialogItem

Properties

enabled : Boolean
[Get]
Signature
val enabled: Boolean = true
key : String
[Get]
Signature
val key: String
leadingIcon : (@Composable () -> Unit)?
[Get]
Signature
val leadingIcon: @Composable () -> Unit? = null
subtitle : String?
[Get]
Signature
val subtitle: String? = null
title : String
[Get]
Signature
val title: String