Here's what it looks like:
Scaffold(
topBar = {
MediumTopAppBar(
colors = TopAppBarDefaults.mediumTopAppBarColors(
containerColor = Color.Yellow
),
// modifier = Modifier.fillMaxHeight(),
title = { Text(text = "Expense")}
)
},
content = { innerPadding ->
Column(modifier = Modifier.padding(innerPadding)) {
Text(text = "Expenses")
}
}
)
Even the fillMaxHeight wasnt able to alter the height of the container color that is shown in the image.

There was a bug described on the Google Issue Tracker. It should be resolved in recent versions of the
material3dependency. Please update your dependency to the latest stable release:Let me know if that resolves the issue.