Skip to content

Instantly share code, notes, and snippets.

View AlexeyKorshun's full-sized avatar

Alexey Korshun AlexeyKorshun

  • 15:33 (UTC +06:00)
View GitHub Profile
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 })