Is there any better way of having content fill max...
# compose
r
Is there any better way of having content fill max width, up to a given dp?
Copy code
BoxWithConstraints(
        modifier = modifier.fillMaxWidth(),
        contentAlignment = Alignment.Center,
    ) {
        val width = if (maxWidth > 360.dp) 360.dp else maxWidth
        // Draw content with a fixed width of width
a
Copy code
Modifier
    .widthIn(max = 360.dp)
    .fillMaxWidth()
👍 3
r
Thank you! I had them in the wrong order 🙂