BottomBar overlays scaffold content when using LazyColumn

Viewed 409

When I use Scaffold with a long LazyColumn in it's content and some composable in bottomBar parameter I can't see last item of the column because BottomBar overlays it. Is there a way to fix this overlaying?

1 Answers

In your Scaffold, the content has a PaddingValues parameter, you can use it to add the correct padding.

Something like this:

Scaffold(
   ...
) {
    Box(
        modifier = Modifier
            .fillMaxSize()
            .padding(
                bottom = it.calculateBottomPadding()
            )
            //.padding(it) // <<-- or simply this 
    ) {
        // Your content
    }
}
Related