Arun
Box
height
@Composable @Preview fun PreviewSquareItems() { Row(modifier = Modifier.fillMaxWidth()) { val total = 2 repeat(total) { index -> Box( modifier = Modifier .weight(1f) .height(245.dp) // how to find this height? .clip(RoundedCornerShape(8.dp)) .background(color = Color.Blue), ) if (index + 1 < total) { Spacer(modifier = Modifier.width(10.dp)) } } } }
Se7eN
Modifier.aspectRatio(1f)
A modern programming language that makes developers happier.