Chris Fillmore
09/01/2022, 6:29 PMLazyListScope.items()
I have this function more or less, in my app. Would something like this ever land in the material package?Chris Fillmore
09/01/2022, 6:30 PM@Composable
fun <T> DropdownMenu(
items: List<T>,
onItemClick: (T) -> Unit,
itemContent: @Composable RowScope.(T) -> Unit,
) {
DropdownMenu(...) {
for (item in items) {
DropdownMenuItem(
onClick = {
onItemClick(item)
},
content = { itemContent(item) },
)
}
}
}
Chris Fillmore
09/01/2022, 6:43 PM