Marko Novakovic
10/31/2022, 4:34 PMText(
text = label,
textAligh = TextAlign.Center,
modifier = Modifier.width(labelWidth),
)
adding textAligh
gives me an error:
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?Marko Novakovic
10/31/2022, 4:36 PMinlineContent: Map<String, InlineTextContent> = mapOf(),
Ian Lake
10/31/2022, 4:37 PMtextAlign
as textAligh
with an h, not an n in the code you've pastedMarko Novakovic
10/31/2022, 4:38 PMMarko Novakovic
10/31/2022, 4:39 PMtextStyle
gives same errorMarko Novakovic
10/31/2022, 4:40 PMText(
text = label,
textAlign = TextAlign.Center,
textStyle = MyTheme.typography.small,
modifier = Modifier.width(labelWidth),
)
and it’s spelled correctly 😄Ian Lake
10/31/2022, 4:41 PMstyle
Marko Novakovic
10/31/2022, 4:42 PMtextStyle
Marko Novakovic
10/31/2022, 4:42 PM