StylishToastData

data class StylishToastData(val message: String, val variant: StylishToastVariant = StylishToastVariant.Normal, val durationMillis: Long = 3000, val actionLabel: String? = null, val onAction: () -> Unit? = null)

A single toast entry managed by StylishToastHostState.

Constructors

Link copied to clipboard
constructor(message: String, variant: StylishToastVariant = StylishToastVariant.Normal, durationMillis: Long = 3000, actionLabel: String? = null, onAction: () -> Unit? = null)

Properties

Link copied to clipboard

Optional action button label.

Link copied to clipboard

How long the toast stays visible before it is dismissed automatically. Defaults to 3000 ms.

Link copied to clipboard

The toast body text.

Link copied to clipboard
val onAction: () -> Unit?

Optional callback invoked when the action button is tapped.

Link copied to clipboard

The semantic variant controlling colors and icon.