SimpleAspectRatio
@Composable
fun SimpleAspectRatio() {
Box(Modifier.width(100.dp).aspectRatio(2f).background(Color.Green))
}Attempts to size the content to match a specified aspect ratio by trying to match one of the incoming constraints in the following order: [Constraints.
@Composable
fun SimpleAspectRatio() {
Box(Modifier.width(100.dp).aspectRatio(2f).background(Color.Green))
}