Text is not in center in iOS, same is working fine...
# compose-ios
d
Text is not in center in iOS, same is working fine in android.
Copy code
Text(
   text = it,
   modifier = Modifier.then(modifier)
       .background(tagData.bgColor ?: Color.Yellow, shape = RoundedCornerShape(12.dp))
       .padding(horizontal = 8.dp),
   color = tagData.color ?: Color.Black,
   fontSize = 12.sp
)
c
I can confirm this too
v
Try to wrap the Text into a Box for instance. And center the text within that box.
And apply the background to the box instead of the text.
c
Same thing with a box, I had to wrap inside a Button
d
v
Just out of curiosity, have you tried with another font to check if the results are the same?
🚫 1