https://kotlinlang.org logo
Title
r

rsktash

02/04/2022, 6:41 AM
Can we add extension function like
SpacedBy(4.dp) { Content() }
for
ColumnScope
and
RowScope
?
m

Mini

02/04/2022, 6:58 AM
Is Row
horizontalArrangement = Arrangement.spacedBy(4.dp)
not sufficient?
👍🏻 1
r

rsktash

02/04/2022, 7:01 AM
It is available only when we call Columns and Rows functions directly But when we use material components we can pass composable content with ColumnsScope or RowScope. Here we can’t use it
m

Mini

02/04/2022, 7:04 AM
shouldnt the arrangement be set by the parent anyways?
fun RowScope.MyComposable(){
Might work for what youre trying to accomplish?
r

rsktash

02/04/2022, 7:05 AM
It won’t
d

Dragos Rachieru

02/04/2022, 8:03 AM
isn't padding enough for what you want? Or do you need custom spacing per item that handles both first and last position?