Fix preview

Report a typo

Fix the preview function to be able to see the result of the written code.

Write a program in Kotlin
@Preview
fun MessageInputPreview(text: String) {
HyperskillTheme {
val textLength = text.trim().count()
when {
textLength < 1 -> Text(text = "The message text is empty.")
textLength > 100 -> Text(text = "The message text is too long.")
else -> Text(text = "Message sent!")
}
}
}
___

Create a free account to access the full topic