// each text is measured first and gets the space needed for it's content
// then the spacers are measured and divide up the space a close to the
// desired 1:3 or a 1:1:1 ratio as possible.
Row(modifier = Modifier.fillMaxWidth()) {
Spacer(modifier = Modifier.weight(1f))
Text(text = text1)
Spacer(modifier = Modifier.weight(1f))
Spacer(modifier = Modifier.weight(3f.takeIf{ text3 == null } ?: 1))
Text(text = text2)
Spacer(modifier = Modifier.weight(3f.takeIf{ text3 == null } ?: 1))
text3?.let {
Spacer(modifier = Modifier.weight(1f))
Text(text = text3)
Spacer(modifier = Modifier.weight(1f))
}
}