UiMessage

data class UiMessage(val text: UiText, val isError: Boolean = false, val actionLabel: UiText? = null, val id: Long = nextId.incrementAndGet())(source)

A message a screen shows in a snackbar, queued with ScreenViewModel.showMessage.

Constructors

Link copied to clipboard
constructor(text: UiText, isError: Boolean = false, actionLabel: UiText? = null, id: Long = nextId.incrementAndGet())

Properties

Link copied to clipboard

The label of its action, or null for none; MessageHost reports a press.

Link copied to clipboard
val id: Long

Tells two messages with the same text apart, so the same message queued twice is shown twice. Unique within the process.

Link copied to clipboard

Shows it in the error style, and for longer.

Link copied to clipboard

What the message says.