This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class Contact(val name: String, val phones: List<String>) | |
@Composable | |
fun ContactRow(contactFlow: StateFlow<Contact>, modifier: Modifier = Modifier) { | |
var selected by remember { mutableStateOf(false) } | |
val contact = contactFlow.collectAsState() | |
Row(modifier) { | |
ContactDetails(contact.value) | |
ToggleButton(selected, onToggled = { selected = !selected }) |