onMessageReceived property

Stream get onMessageReceived

A stream that emits events when a message is received.

This stream listens for incoming messages from the Mirrorfly platform. Each event contains the data of the received message. Use this stream to update your UI or perform actions upon receiving a new message.

Usage example:

Mirrorfly.onMessageReceived.listen((messageData) {
  // Handle the received message
  print("New message received: $messageData");
});

Implementation

static Stream<dynamic> get onMessageReceived =>
    FlyChatFlutterPlatform.instance.onMessageReceived;