Nat Strangerweather
07/19/2022, 6:06 PM@Composable
fun ShowDropDown(
openDropDown: MutableState<Boolean>,
text: List<String>,
destination: List<DirectionDestination>,
navigator: DestinationsNavigator,
) {
DropdownMenu(
expanded = openDropDown.value,
onDismissRequest = { openDropDown.value = false },
) {
text.zip(destination)
.forEach {
DropdownMenuItem(onClick = { navigator.navigate(it.second) },
text = { Text(it.first) })
}
}
}
Landry Norris
07/19/2022, 6:09 PMlist1.zip(list2.zip(list3))
, and it would be a List<Pair<A, Pair<B, C>>>, where A, B, and C are the types of list1, list2, and list3..map { abc ->
Triple(abc.first, abc.second.first, abc.second.second)
}
Nat Strangerweather
07/19/2022, 6:12 PMLandry Norris
07/19/2022, 6:12 PMMichael de Kaste
07/20/2022, 8:20 AMlist1.zip(list2).zip(list3) { (a, b), c -> Triple(a, b, c) }