I am migrating my code from Material2 to Material3. The TopAppBar in Material3 has a larger height than Material2, which is not what I want. I have tried reducing the height using the following without success:
windowInsets = WindowInsets(top = 0.dp, bottom = 0.dp)
modifier = Modifier.height(56.dp)
I cannot duplicate and modify the source code because there are too many internal functions and classes for it to be feasible.
This will reduce the height to the original material design height and the text inside the bar will remain vertically centered:
TopAppBar(
// required parameters,
modifier = Modifier.heightIn(max = 56.dp),
)