LazyColumns verticalArrangement Hi guys, I have a...
# compose
k
LazyColumns verticalArrangement Hi guys, I have a problem with LazyColumns Arrangement.spacedBy 😜. After targeting android 16 there is a need to handle insets. The documentation states to use Spacers for LazyColumns. So I did
Copy code
LazyColumn(
    verticalArrangement = Arrangement.spacedBy(10.dp),
) {
    item {
        Spacer(modifier = Modifier.windowInsetsTopHeight(WindowInsets.statusBars))
    }
    // some content
    item {
        Spacer(modifier = Modifier.windowInsetsBottomHeight(WindowInsets.navigationBars))
    }
}
But this does not go well together. Now I will have additional spacings at the top and bottom even if insets are consumed by the parent (the lazy column will apply padding between items even if the item is empty). And here is my question, do anyone know how to handle such a scenario? I just want the first and last item to ignore this additional spacing provided by the spacedBy.