onMessageReceived property

void Function(ChatwootMessage)? onMessageReceived
getter/setter pair

Triggered when a message created event/message ChatwootEventMessageType.message_created is received and message doesn't belong to current user after connecting to the chatwoot websocket. See ChatwootRepository.listenForEvents

Implementation

void Function(ChatwootMessage)? onMessageReceived;