can AppBar has an option to center title, like in ...
# compose
k
can AppBar has an option to center title, like in flutter. Some users prefer title in the center
AppBar(centerTitle: true, title: Text("Title"))
😿 2
a
Copy code
TopAppBar(
    title = {
        Text(
            text = "Title",
            modifier = Modifier.fillMaxWidth(),
            textAlign = TextAlign.Center
        )
    }
)
k
if actions are added it's not good
a
for custom use cases such as horizontally centering the title, use the other TopAppBar overload for a generic TopAppBar with no restriction on content.
👆 1
👍 1