SelectionListNode

data class SelectionListNode<ID : Any>(val id: ID, val title: String, val subtitle: String? = null, val leadingGlyph: String? = null, val children: List<SelectionListNode<ID>> = emptyList())

A node in a one- or two-level SelectionList tree.

A node without children is a leaf that is selected when tapped. A node with children is an expandable parent: tapping it shows its children inline, and selecting one reports that child's id. Identifiers must be unique across the whole tree; they are list keys and the values the list reports.

Constructors

Link copied to clipboard
constructor(id: ID, title: String, subtitle: String? = null, leadingGlyph: String? = null, children: List<SelectionListNode<ID>> = emptyList())

Properties

Link copied to clipboard
Link copied to clipboard
val id: ID
Link copied to clipboard

Whether the node has no children and is therefore directly selectable.

Link copied to clipboard

optional leading text glyph, typically an emoji or flag.

Link copied to clipboard

optional secondary text under the title.

Link copied to clipboard

primary row text.