I have a LazyColumn
where I have a contentPadding = PaddingValues(16.dp)
Now, I want to add navigation bar height to the bottom padding, as to achieve the "edge to edge" effect
so contentPadding = WindowInsets.navigationBars.asPaddingValues()
But how do I add these two together?
i.e.
LazyColumn(
contentPadding = WindowInsets.navigationBars.asPaddingValues() + PaddingValues(16.dp),
I created this
@Composable
operator fun PaddingValues.plus(paddingValues: PaddingValues): PaddingValues {
val layoutDirection = LocalLayoutDirection.current
return PaddingValues(
start = calculateStartPadding(layoutDirection) + paddingValues.calculateStartPadding(layoutDirection),
top = calculateTopPadding() + paddingValues.calculateTopPadding(),
end = calculateEndPadding(layoutDirection) + paddingValues.calculateEndPadding(layoutDirection),
bottom = calculateBottomPadding() + paddingValues.calculateBottomPadding()
)
}
But it feels wrong