I added bottomNavigation to scaffold. However, the...
# compose
l
I added bottomNavigation to scaffold. However, the bottom of the content of the scaffold is covered by the bottom navigation. What should I do?
f
Use the inner padding provided by the scaffold body lambda
👍 1
l
Copy code
Scaffold(
    bottomBar = {
        ...
    },
) {
    NavHost(navController, startDestination = "one") {
        composable("one") { ... }
        composable("two") { ... }
        composable("three") { ... }
    }
}
where shoud i use?
Copy code
Do I have to pass the padding as a parameter for each composable?
j
I suppose you can wrap NavHost inside a Box and use the paddings on the box
l
@jaqxues thank you!