https://kotlinlang.org logo
#compose
Title
# compose
d

Davide Giuseppe Farella

10/03/2020, 6:57 AM
What’s the replacement for
Modifier.align
on alpha 4?
👍 1
1
z

Zach Klippenstein (he/him) [MOD]

10/03/2020, 7:55 AM
It's still there, but you need to have an explicit scope receiver. E.g
ColumnScope
🙏 1
d

Davide Giuseppe Farella

10/03/2020, 9:13 AM
Oh 😕 Pretty verbose
Something like that?
You can't just use align with any layout composable, it only works with certain ones. They are changing the API to make it very difficult to use them in the wrong context, by forcing you to be in the right scope to get access to them.
🙏 1
d

Davide Giuseppe Farella

10/03/2020, 10:08 AM
I see! I thank you for the explanation
Fixed simply with this 🙂 Cool 🙂