Skip to main content

eventChannel

Note: This API is supported from version 5.1.0 

​This channel holds events related to SDK notifications. 

Event nameInvoked when
NotificationAction.clickedEvent 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
                  }
             }
        }
});