eventChannel
The ZohoSalesIQ.knowledgeBase.eventChannel holds events related to the resource operations.
Event keys:
Property | Datatype | Description |
action | ResourceAction | Action performed on the resource. Events are listed below. |
type | ResourceType | Type of the resource |
resource | Resource | Details of the resource that action |
RecourceAction Events:
Events | Invoked when |
opened | The visitor opens a resource |
closed | The visitor closes a resource |
liked | The visitor likes a resource |
disliked | The visitor dislikes a resource |
Syntax
CopiedZohoSalesIQ.knowledgeBase.eventChannel.listen((KnowledgeBaseEvent event) {
});
Example
CopiedZohoSalesIQ.knowledgeBase.eventChannel.listen((event) {
switch (event.action) {
case ResourceAction.opened:
// your code to handle the event
break;
case ResourceAction.closed:
// your code to handle the event
break;
case ResourceAction.liked:
// your code to handle the event
break;
case ResourceAction.disliked:
// your code to handle the event
break;
}
});