show

suspend fun show(message: String, style: ToolkitSnackbarStyle = ToolkitSnackbarStyle.Normal, actionLabel: String? = null, withDismissAction: Boolean = true, duration: SnackbarDuration? = null, icon: ToolkitIcon? = null, colors: ToolkitSnackbarColors? = null, content: @Composable (SnackbarData) -> Unit? = null): SnackbarResult(source)

Shows a snackbar and suspends until it leaves, replacing any snackbar showing.

Return

Whether its action was performed or it was dismissed.

Parameters

message

The text.

style

The normal or the error look.

actionLabel

The action's label; none without it.

withDismissAction

Whether it has a close button.

duration

How long it stays; by default long for an error or with an action, short otherwise.

icon

Drawn before the message.

colors

Replace the colours of style.

content

Draws the snackbar instead of the Toolkit's.