SnackBarComponentConfiguration

data class SnackBarComponentConfiguration(val messageResId: Int = 0, val messageArgs: List<Any> = emptyList(), val actionLabel: String? = null, val duration: ERROR CLASS: Symbol not found for SnackbarDuration = SnackbarDuration.Short, val type: SnackBarType = SnackBarType.INFO)

Configuration data for displaying a Snackbar, encapsulating the message string resource, optional action label, display duration, and a semantic type that drives the snackbar color.

The message is carried as a StringRes id (plus optional messageArgs format arguments) rather than a resolved string so that all snackbar copy is localizable and lives in strings.xml. It is resolved to a display string at the UI layer (see SharedFlow.hookSnackBar), which has a android.content.Context. Passed in-memory via kotlinx.coroutines.flow.SharedFlow — no serialization needed.

Constructors

Link copied to clipboard
constructor(messageResId: Int = 0, messageArgs: List<Any> = emptyList(), actionLabel: String? = null, duration: ERROR CLASS: Symbol not found for SnackbarDuration = SnackbarDuration.Short, type: SnackBarType = SnackBarType.INFO)

Properties

Link copied to clipboard

Optional label for the snackbar action button; null means no action.

Link copied to clipboard
val duration: ERROR CLASS: Symbol not found for SnackbarDuration

How long the snackbar should be visible; defaults to SnackbarDuration.Short.

Link copied to clipboard

Format arguments for messageResId when it contains placeholders (e.g. %1$s).

Link copied to clipboard

String resource id for the snackbar body; 0 means "no message" (skipped).

Link copied to clipboard

The semantic type driving the snackbar color; defaults to SnackBarType.INFO.