Complete the code to add a Spacer with a height of 16.dp between two Text composables.
Column {
Text(text = "Hello")
Spacer(modifier = Modifier.[1](16.dp))
Text(text = "World")
}The Spacer composable uses Modifier.height() to set vertical space.
Complete the code to add a Spacer with a width of 24.dp between two Buttons in a Row.
Row {
Button(onClick = {}) { Text("Yes") }
Spacer(modifier = Modifier.[1](24.dp))
Button(onClick = {}) { Text("No") }
}In a Row, horizontal space is set using Modifier.width().
Complete the code to add a Spacer with a height of 10.dp.
Spacer(modifier = Modifier.[1](10.dp))
Use Modifier.height(10.dp) to set vertical space.
Fill both blanks to create a Spacer with width 12.dp and height 8.dp.
Spacer(modifier = Modifier.[1](12.dp).[2](8.dp))
Use Modifier.width() for horizontal and Modifier.height() for vertical dimensions.
Fill all three blanks to create a Spacer with width 20.dp, height 10.dp, and a background color.
Spacer(modifier = Modifier.[1](20.dp).[2](10.dp).background(color = [3]))
Use Modifier.width() and Modifier.height() to set size, and Color.Red for background color.
