I am trying to create TopAppBar but could not find the backgroundColor field for the TopAppBar function.
Material3 version which i am using
implementation 'androidx.compose.material3:material3:1.1.0-alpha01'
This is how my function looks like
fun topbar() {
TopAppBar(
title = {
Text(
"TopBar",
maxLines = 1,
overflow = TextOverflow.Ellipsis
)
},
navigationIcon = {
IconButton(onClick = { /* doSomething() */ }) {
Icon(
imageVector = Icons.Filled.Menu,
contentDescription = "Localized description"
)
}
},
actions = {
// RowScope here, so these icons will be placed horizontally
IconButton(onClick = { /* doSomething() */ }) {
Icon(
imageVector = Icons.Filled.Search,
contentDescription = "Localized description"
)
}
IconButton(onClick = { /* doSomething() */ }) {
Icon(
imageVector = Icons.Filled.Menu,
contentDescription = "Localized description"
)
}
}
)
}