Skip to content

Instantly share code, notes, and snippets.

@Mercandj
Last active April 13, 2023 09:50
Show Gist options
  • Save Mercandj/6acb743dd6b9875fe4f94315bf3487cd to your computer and use it in GitHub Desktop.
Save Mercandj/6acb743dd6b9875fe4f94315bf3487cd to your computer and use it in GitHub Desktop.
Box { // Parent
Box( // Child
modifier = Modifier
.aspectRatioReference(
ratioWidth = 1f,
ratioHeight = 1f,
AspectRatioReference.MIN_PARENT_WIDTH_PARENT_HEIGHT
)
.align(Alignment.Center)
) {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment