Package-level declarations

Functions

Link copied to clipboard
fun EventSchemaBuilderScope.DismissSnackbar(id: String = randomId(), trigger: EventTrigger, events: EventSchemaBuilderScope.() -> Unit = {})

Hides the snackbar currently showing on the screen, by broadcasting a dismiss command on the screen channel. Does not consume incomingData. Dispatches onSuccess (no data) always, right after the command is broadcast — the broadcast is fire-and-forget, so this fires even when no snackbar is showing.

Link copied to clipboard
fun EventSchemaBuilderScope.DisplaySnackbar(id: String = randomId(), trigger: EventTrigger, message: String, duration: DisplaySnackbarEventSchema.SnackbarDuration = snackbarShortDuration(), actionLabel: String? = null, events: EventSchemaBuilderScope.() -> Unit = {})

Shows a snackbar with message, by broadcasting a display command on the screen channel. duration maps onto Material's short/long/indefinite durations, and actionLabel adds an action button when non-null. Does not consume incomingData. Dispatches onSuccess (no data) right after the command is broadcast, before the snackbar has resolved — the broadcast is fire-and-forget, so this fires regardless of what the snackbar does next; later, onSnackbarAction (no data) when the user presses the action button, or onSnackbarDismissed (no data) when the snackbar goes away without its action being pressed.

Link copied to clipboard

Snackbar stays visible until dismissed by its action or manually — never times out on its own.

Link copied to clipboard

Snackbar stays visible for Material's long duration.

Link copied to clipboard

Snackbar stays visible for Material's short duration.