This repository was archived by the owner on May 7, 2025. It is now read-only.
Replies: 1 comment 1 reply
-
TextField(
value = server,
modifier = Modifier.fillMaxWidth(),
error = if (errors.value is Errors.BadServer) {
@Composable { Text(text = "Can not connect to this server") }
} else {
null
},
) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
shalva97
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Decided to use the TextField's
errorargument. But the red icon is always visibleHow do I use it? my first try was this
That did not work because it checks if the argument is null and then displays red icon. My second try was:
But there I get compilation error. Of course I could duplicate it and wrap whole TextField in if statement, but this feels wrong (lots of arguments will be duplicated). So how can I use it?
Beta Was this translation helpful? Give feedback.
All reactions