Is there an other flexible way to swap out a horiz...
# compose
a
Is there an other flexible way to swap out a horizontal layout with a vertical one? all i can think of is, but there has to be an other way:
Copy code
if (horizontal) {
                    Row {
                        content()
                    }
                } else {
                    Column {
                        content()
                    }
What I don't like about this is that it makes the code difficult to follow. it would be cool if the swapping could be inlined somehow
e
You could make a wrapper around it. You should also use movableContentOf
👀 1
today i learned 1
z
In the past I created a
Container
composable that did this under the hood. It worked great but plus1 for this in compose foundation.