Is it possible for a child composable to ignore the padding of the parent?
a
Is it possible for a child composable to ignore the padding of the parent?
Let’s say for example:
Copy code
Column(
    Modifier.padding(horizontal = 16.dp)
) {

    Text()
    
    Divider() // is it possible to ignore padding?
    
    Text()

    Button()
}
I was thinking it might be nice to apply the padding once instead of
Copy code
Column {

    Text(Modifier.padding(horizontal = 16.dp))
    
    Divider()
    
    Text(Modifier.padding(horizontal = 16.dp))

    Button(Modifier.padding(horizontal = 16.dp))
}
Or is there a better way to handle such scenario?
d
Does
.required*
help you? Modifier.requiredWidth(...) as an example in your Divider modifier.