Is there any equivalent for `app:layout_constraint...
# compose
t
Is there any equivalent for
app:layout_constraintDimensionRatio
in compose Searched all through the google and SO got no luck
s
There is an
aspectRatio
modifier. Does that help?
t
@sindrenm Let me check it out
s
For example, if you want something to span the width of the screen, but preserve a 16 : 9 aspect ratio, something like this should do the trick:
Copy code
Modifier
  .fillMaxWidth()
  .aspectRatio(16f / 9)
t
Awesome man That worked
s
Sweet! 🎉