NotificationSpec

data class NotificationSpec(val message: String, val severity: NotificationSeverity = NotificationSeverity.INFO, val dismissAfter: Duration? = defaultDismissAfter(severity))(source)

Authoring shape for a notification handed to Notifications.show.

Constructors

Link copied to clipboard
constructor(message: String, severity: NotificationSeverity = NotificationSeverity.INFO, dismissAfter: Duration? = defaultDismissAfter(severity))

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

how long the card stays visible before auto-dismissal. null means manual only — the card stays until the user clicks it. When omitted, defaults to defaultDismissAfter(severity) (INFO and WARNING 5 s, ERROR 8 s per scenario workflow §4 surface 5).

Link copied to clipboard

human-readable text shown on the card. Use a short one-liner; longer text wraps but the card is intended as a transient at-a-glance status message, not a dialog body.

Link copied to clipboard