eventChannel
Note: This API is supported from version 5.1.0
This channel holds events related to SDK notifications.
Event name | Invoked when |
NotificationAction.clicked | Event of an SDK notification is clicked. |
Syntax
CopiedZohoSalesIQ.notification.eventChannel.listen((event) {
// your code to handle events
});
Usage
CopiedZohoSalesIQ.notification.eventChannel.listen((event) {
switch (event.action) {
case NotificationAction.clicked:
SalesIQNotificationPayload? payload = event.payload;
if (payload != null) {
if (payload is SalesIQNotificationPayloadChat) {
// Handle chat notification clicks
} else if (payload is SalesIQNotificationPayloadEndChatDetails) {
// Handle end chat notification clicks
} else if (payload is SalesIQNotificationPayloadVisitorHistory) {
// Handle visitor history notification clicks
}
}
}
});