getMessageOfId static method
This method fetches the details of a message identified by its unique messageId
.
It returns a Future<String?> that completes with the message details as a JSON string,
or null
if the message cannot be found or an error occurs.
Parameters:
messageId
- The unique identifier of the message whose details are to be retrieved.
Returns:
A Future<String?> that completes with the message details as a JSON string or null
.
Example usage:
String? messageDetails = await Mirrorfly.getMessageOfId(messageId: "message_id");
if (messageDetails != null) {
print("Message details: $messageDetails");
} else {
print("Message not found or error occurred");
}
Implementation
static Future<String?> getMessageOfId({required String messageId}) {
return FlyChatFlutterPlatform.instance.getMessageOfId(messageId);
}