NotificationManager
Description
A notification manager used to create Notifications to be shown to the user.
API documentation
Events
::onDidAddNotification(callback)
Invoke the given callback after a notification has been added.
| Argument | Description |
|---|---|
callback
|
Function to be called after the notification is added. |
notification
|
The Notification that was added. |
Return values
-
Returns a Disposable on which
.dispose()can be called to unsubscribe.
Adding Notifications
::addSuccess(message, options)
Add a success notification.
| Argument | Description |
|---|---|
message
|
A String message |
options
|
An options Object with optional keys such as: |
detail
|
A String with additional details about the notification |
::addInfo(message, options)
Add an informational notification.
| Argument | Description |
|---|---|
message
|
A String message |
options
|
An options Object with optional keys such as: |
detail
|
A String with additional details about the notification |
::addWarning(message, options)
Add a warning notification.
| Argument | Description |
|---|---|
message
|
A String message |
options
|
An options Object with optional keys such as: |
detail
|
A String with additional details about the notification |
::addError(message, options)
Add an error notification.
| Argument | Description |
|---|---|
message
|
A String message |
options
|
An options Object with optional keys such as: |
detail
|
A String with additional details about the notification |
::addFatalError(message, options)
Add a fatal error notification.
| Argument | Description |
|---|---|
message
|
A String message |
options
|
An options Object with optional keys such as: |
detail
|
A String with additional details about the notification |
Getting Notifications
::getNotifications()
Get all the notifications.
Return values
-
Returns an Array of Notificationss.