```Text( text = label, textAligh = TextAli...
# compose
m
Copy code
Text(
    text = label,
    textAligh = TextAlign.Center,
    modifier = Modifier.width(labelWidth),
)
adding
textAligh
gives me an error:
Copy code
None of the following functions can be called with the arguments supplied.
Text(AnnotatedString, Modifier = ..., Color = ..., TextUnit = ..., FontStyle? = ..., FontWeight? = ..., FontFamily? = ..., TextUnit = ..., TextDecoration? = ..., TextAlign? = ..., TextUnit = ..., TextOverflow = ..., Boolean = ..., Int = ..., Map<String, InlineTextContent> = ..., (TextLayoutResult) → Unit = ..., TextStyle = ...) defined in androidx.compose.material3
Text(String, Modifier = ..., Color = ..., TextUnit = ..., FontStyle? = ..., FontWeight? = ..., FontFamily? = ..., TextUnit = ..., TextDecoration? = ..., TextAlign? = ..., TextUnit = ..., TextOverflow = ..., Boolean = ..., Int = ..., (TextLayoutResult) → Unit = ..., TextStyle = ...) defined in androidx.compose.material3
so how am supposed to show the text with
textAlign
parameter?
those two have only one different parameter,
Copy code
inlineContent: Map<String, InlineTextContent> = mapOf(),
i
You've spelled
textAlign
as
textAligh
with an h, not an n in the code you've pasted
m
and that’s how I wrote it in code… wow. thanks 😄
but now adding
textStyle
gives same error
Copy code
Text(
    text = label,
    textAlign = TextAlign.Center,
    textStyle = MyTheme.typography.small,
    modifier = Modifier.width(labelWidth),
)
and it’s spelled correctly 😄
i
it is just
style
m
it works, but it still autocompletes
textStyle
thanks 😄