NotificationConstructorOptions

Properties

Link copied to clipboard

Actions to add to the notification. Please read the available actions and limitations in the NotificationAction documentation.

Link copied to clipboard
abstract var body: String?

The body text of the notification, which will be displayed below the title or subtitle.

Link copied to clipboard
abstract var closeButtonText: String?

A custom title for the close button of an alert. An empty string will cause the default localized text to be used.

Link copied to clipboard
abstract var groupId: String?

A string identifier used to visually group notifications together in Notification Center / Action Center. On macOS, maps to UNNotificationContent's threadIdentifier property. On Windows, maps to the toast notification's Group property. Use this identifier with Notification.removeGroup() to remove all notifications in a group.

Link copied to clipboard
abstract var groupTitle: String?

A title for the notification group header. When both groupId and groupTitle are specified, Windows will display a header above the notification that groups related notifications together. Maps to the toast notification's header element.

Link copied to clipboard
abstract var hasReply: Boolean?

Whether or not to add an inline reply option to the notification.

Link copied to clipboard
abstract var icon: Any?

An icon to use in the notification. If a string is passed, it must be a valid path to a local icon file.

Link copied to clipboard
abstract var id: String?

A unique identifier for the notification. On macOS, maps to UNNotificationRequest's identifier property. On Windows, maps to the toast notification's Tag property. Defaults to a random UUID if not provided or if an empty string is passed. Use this identifier with Notification.remove() to remove specific delivered notifications, or with Notification.getHistory() to identify them.

Link copied to clipboard
abstract var replyPlaceholder: String?

The placeholder to write in the inline reply input field.

Link copied to clipboard
abstract var silent: Boolean?

Whether or not to suppress the OS notification noise when showing the notification.

Link copied to clipboard
abstract var sound: String?

The name of the sound file to play when the notification is shown.

Link copied to clipboard
abstract var subtitle: String?

A subtitle for the notification, which will be displayed below the title.

Link copied to clipboard

The timeout duration of the notification. Can be 'default' or 'never'.

Link copied to clipboard
abstract var title: String?

A title for the notification, which will be displayed at the top of the notification window when it is shown.

Link copied to clipboard
abstract var toastXml: String?

A custom description of the Notification on Windows superseding all properties above. Provides full customization of design and behavior of the notification.

Link copied to clipboard

The urgency level of the notification. Can be 'normal', 'critical', or 'low'.