我想自定义 IconButton 的颜色,而不是使用 TopAppBar 上设置的默认值,但是在android.compose.material中没有插槽 api 可以更改它。
Scaffold(
topBar = {
TopAppBar(
title = {
Text(text = "LayoutsCodelab")
},
actions = {
IconButton(onClick = { /* doSomething() */ }) { // <- why it has the theme color and how to custom it.
Icon(Icons.Filled.Favorite)
}
}
)
}
)