MessagingService

new MessagingService()

Service for displaying messages and notifications to the user.

Methods

_showMessage(message, options) → {Promise}

Show a generic message with options.

Parameters:
NameTypeDescription
messagestring

The message to display

optionsObject

Options for the message display

Returns:
Type: 
Promise

showError(message, titleopt, optionsopt) → {Promise}

Show an error message.

Parameters:
NameTypeAttributesDefaultDescription
messagestring

The error message to display

titlestring | null<optional>
null

The title of the error message

optionsObject<optional>

Options for the message display

Returns:
Type: 
Promise

showInfo(message, title, optionsopt) → {Promise}

Show an info message.

Parameters:
NameTypeAttributesDefaultDescription
messagestring

The message to display

titlestring | nullnull

The title of the message (optional)

optionsObject<optional>

Options for the message display

Returns:
Type: 
Promise

showSuccess(message, titleopt, optionsopt) → {Promise}

Show a success message.

Parameters:
NameTypeAttributesDefaultDescription
messagestring

The message to display

titlestring | null<optional>
null

The title of the message

optionsObject<optional>

Options for the message display

Returns:
Type: 
Promise

showWarning(message, titleopt, optionsopt) → {Promise}

Show a warning message.

Parameters:
NameTypeAttributesDefaultDescription
messagestring

The warning message to display

titlestring | null<optional>
null

The title of the warning message

optionsObject<optional>

Options for the message display

Returns:
Type: 
Promise

subscribe(key, handler)

Subscribe a handler for message display.

Parameters:
NameTypeDescription
keystring

Unique key for the handler

handlerfunction

Function to handle message display