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

Nat Strangerweather

09/12/2020, 1:52 PM
Is it possible to use
Copy code
val boxModifier = Modifier
    .fillMaxSize() or .fillMaxHeight()
    .weight(1f)
while making sure that the box remains square, so basically, fill the maximum size/height as long as you are square? At the moment I have rectangles which is not looking great...
h

Halil Ozercan

09/12/2020, 1:59 PM
There is a modifier called
aspectRatio
. That might be what you are looking for
👍 1
n

Nat Strangerweather

09/12/2020, 2:00 PM
ah cool thanks!