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.
Properties
Link copied to clipboard
The current SnackbarData being shown by the SnackbarHost, or null
if none.
Functions
Link copied to clipboard
suspend fun showSnackbar(message: String, actionLabel: String? = null, withDismissAction: Boolean = false, duration: SnackbarDuration = if (actionLabel == null) SnackbarDuration.Short else SnackbarDuration.Indefinite): SnackbarResult