Skip to content

BoxWithConstraints

Provides access to constraints inside the composable scope.

BoxWithConstraints {
Image(
painter = painterResource(R.drawable.ocean_cover),
contentDescription = "ocean cover", modifier = Modifier
.size(maxWidth)
.clip(RoundedCornerShape(15.dp))
)
}
  • minWidth
  • minHeight
  • maxWidth
  • maxHeight