SnackbarHostState
State of the SnackbarHost, controls the queue and the current Snackbar being shown inside the SnackbarHost.
This state usually lives as a part of a ScaffoldState and provided to the SnackbarHost automatically, but can be decoupled from it and live separately when desired.
Properties
Link copied to clipboard
The current SnackbarData being shown by the SnackbarHost, of null
if none.
Functions
Link copied to clipboard
suspend fun showSnackbar(message: String, actionLabel: String? = null, duration: SnackbarDuration = SnackbarDuration.Short): SnackbarResult
Shows or queues to be shown a Snackbar at the bottom of the Scaffold at which this state is attached and suspends until snackbar is disappeared.