I am trying to build the following component,
Following is my code,
Button(onClick = { /*TODO*/ }, modifier = Modifier.fillMaxWidth()) {
Image(painter = painterResource(id = R.drawable.ic_check_circle) , contentDescription = "")
Text(text = "John Doe", textAlign = TextAlign.Start)
Image(painter = painterResource(id = R.drawable.ic_arrow_forward), contentDescription = "",
alignment = Alignment.TopEnd)
}



You can use
Spacer:Modifier.width(10.dp)will give you static size.Modifier.weight(1f))will fill all available space.Result: