Jenga Snackbar Host State
Drives a JengaSnackbarHost: enqueue transient messages with showSnackbar. Create one with rememberJengaSnackbarHostState. Wraps the Material queueing machinery, keeping it out of Jenga's public API.
Functions
Link copied to clipboard
suspend fun showSnackbar(message: String, tone: JengaSnackbarTone = JengaSnackbarTone.Neutral, actionLabel: String? = null, duration: JengaSnackbarDuration = JengaSnackbarDuration.Short): JengaSnackbarResult
Shows a snackbar and suspends until it is dismissed or its action is tapped. A second call while one is showing replaces the current snackbar.
suspend fun showSnackbar(message: String, durationMillis: Long, tone: JengaSnackbarTone = JengaSnackbarTone.Neutral, actionLabel: String? = null): JengaSnackbarResult
Shows a snackbar for exactly durationMillis, or until its action is tapped, and suspends until then.