{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

SnackbarResult

public enum SnackbarResult extends Enum

java.lang.Object
   ↳ kotlin.Enum
     ↳ androidx.compose.material3.SnackbarResult

Possible results of the SnackbarHostState.showSnackbar call

Summary

Enum Values

ActionPerformed

Action on the Snackbar has been clicked before the time out passed

Dismissed

Snackbar that is shown has been dismissed either by timeout of by user

Public methods

final @NonNull EnumEntries<@NonNull SnackbarResult>

Possible results of the SnackbarHostState.showSnackbar call

final @NonNull SnackbarResult

Returns the enum constant of this type with the specified name.

final @NonNull SnackbarResult[]

Returns an array containing the constants of this enum type, in the order they're declared.

Enum Values

ActionPerformed

SnackbarResult SnackbarResult.ActionPerformed

Action on the Snackbar has been clicked before the time out passed

Dismissed

SnackbarResult SnackbarResult.Dismissed

Snackbar that is shown has been dismissed either by timeout of by user

Public methods

getEntries

public final @NonNull EnumEntries<@NonNull SnackbarResultgetEntries()

Possible results of the SnackbarHostState.showSnackbar call

valueOf

public final @NonNull SnackbarResult valueOf(@NonNull String value)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Throws
kotlin.IllegalArgumentException

if this enum type has no constant with the specified name

values

public final @NonNull SnackbarResult[] values()

Returns an array containing the constants of this enum type, in the order they're declared.

This method may be used to iterate over the constants.