How do I optionally display a trailing icon? Right...
# compose
z
How do I optionally display a trailing icon? Right now when it has no content, it still takes up the space in the UI
Copy code
trailingIcon = {
  if (enabled) {
    Icon(icon, null, Modifier.clickable { // stuff })
  } else {
    null
  }
}
this (with or without the else statement) for example doesn't work
message has been deleted
l
Copy code
trailingIcon = if (enabled) {
    { Icon(icon) }
} else null
z
That seems to work, thanks