weight-fill-false-to-center-a-cluster
Installation
SKILL.md
Release the weighted slot to centre a cluster
A row holding a sized-by-content block, a gap and a fixed button, meant to read as one cluster:
Row(
horizontalArrangement = Arrangement.Center,
modifier = Modifier.fillMaxWidth().padding(horizontal = 16.dp),
) {
BoxWithConstraints(Modifier.weight(1f, fill = false)) {
// caps each item at a maximum width, so with few items it draws narrower than maxWidth
TabCapsule(availableWidth = maxWidth, tabs = tabs)
}
Spacer(Modifier.size(12.dp))
Box(Modifier.size(56.dp)) { SearchButton() }
}