Google is committed to advancing racial equity for Black communities. See how.

SnackbarData

interface SnackbarData
androidx.compose.material.SnackbarData

Interface to represent one particular Snackbar as a piece of the SnackbarHostState

Summary

Public methods
abstract Unit

Function to be called when Snackbar is dismissed either by timeout or by the user

abstract Unit

Function to be called when Snackbar action has been performed to notify the listeners

Properties
abstract String?

optional action label to show as button in the Snackbar

abstract SnackbarDuration

duration of the snackbar

abstract String

text to be shown in the Snackbar

Public methods

dismiss

abstract fun dismiss(): Unit

Function to be called when Snackbar is dismissed either by timeout or by the user

performAction

abstract fun performAction(): Unit

Function to be called when Snackbar action has been performed to notify the listeners

Properties

actionLabel

abstract val actionLabel: String?

optional action label to show as button in the Snackbar

duration

abstract val duration: SnackbarDuration

duration of the snackbar

message

abstract val message: String

text to be shown in the Snackbar