Can someone explain why `<http://Arrangement.Top|A...
# compose
a
Can someone explain why
<http://Arrangement.Top|Arrangement.Top>
vs
Arrangement.spacedBy(0.dp, <http://Alignment.Top|Alignment.Top>)
does not produce the same result when passed to a `FlowRow`'s verticalArrangement? I was under the impression they mean the same thing. Am I missing something or is this a bug? (<- Top || spacedBy ->)
Copy code
FlowRow(
        modifier = Modifier.fillMaxSize(),
        overflow = FlowRowOverflow.Visible,
        verticalArrangement = Arrangement.Top
//  vs  verticalArrangement = Arrangement.spacedBy(0.dp, Alignment.Top)
    ) {
        repeat(52) {
            Item(Modifier.width(300.dp))
        }
    }
s
From the docs:
Copy code
Place children vertically such that each two adjacent ones are spaced by a fixed [space]
         * distance. The spacing will be subtracted from the available height that the children can
         * occupy. An [alignment] can be specified to align the spaced children vertically inside
         * the parent, in case there is empty height remaining.
I think it is WAI
a
I dont understand how the docs explain the output 😐 It's like Arrangment.spacedBy(0) forces the items to be within bounds, while without it they can overflow. I dont think the distance between items change while using either, does it?
s
Not really, it says that spacing will be subtracted from available height, so you don't get the same behavior on overflow
1
a
i think it's how i interpret 'subtracted from available height'. i understand it as if there is no available height, then it wont be subtracted. but I am assuming it means it will go negative instead
s
Not sure, maybe it is a bug in that case