Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@Composable
fun Profile(user: User) {
BoxWithConstraints(modifier = Modifier.padding(16.dp)) {
when (this.maxWidth) {
in (0.dp..400.dp) -> {
VerticalProfile(user)
}
in (401.dp..900.dp) -> {
HorizontalProfile(user)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment