Real-time updates are the most important part in building an instant chat messaging application. Stringee provides very simple methods to register and listen for events, as described in Connecting.
You will receive StringeeChange
when listen to event onChangeEvent
and you can get StringeeConversation, StringeeMessage updates by StringeeObjectChange.
/// Listen for the StringeeClient event
_stringeeClient.registerEvent(StringeeClientListener(
/// Invoked when receive an chat change event
onChangeEvent: (stringeeClient, objectChange) {
debugPrint('onChangeEvent: objectChange - ${objectChange.toString()}');
debugPrint('onChangeEvent: objectType - ${objectChange.objectType.toString()}');
debugPrint('onChangeEvent: type - ${objectChange.type.index}');
debugPrint('onChangeEvent: objects - ${objects.toString()}');
},
));
In which: