SnackbarHostState
State of the SnackbarHost, which controls the queue and the current Snackbar being shown inside the SnackbarHost.
This state is usually remembered and used to provide a SnackbarHost to a Scaffold.
Functions
Link copied to clipboard
suspend fun showSnackbar(message: String, actionLabel: String? = null, icon: SparkIcon? = null, intent: SnackbarIntent = SnackbarDefaults.intent, style: SnackbarStyle = SnackbarDefaults.style, withDismissAction: Boolean = false, actionOnNewLine: Boolean = false, duration: SnackbarDuration = if (actionLabel == null) {
SnackbarDuration.Short
} else {
SnackbarDuration.Indefinite
}): SnackbarResult
Shows or queues to be shown a Snackbar at the bottom of the Scaffold to which this state is attached and suspends until the snackbar has disappeared.