getMessagesUsingIds static method

Future<String?> getMessagesUsingIds({
  1. required List<String> messageIds,
})

This method fetches messages based on a list of message IDs provided. It returns a Future<String?> that completes with the message details as a JSON string, or null if an error occurs.

Parameters: messageIds - A list of message IDs for which the details are to be retrieved.

Returns: A Future<String?> that completes with the message details as a JSON string or null.

Example usage:

String? messages = await Mirrorfly.getMessagesUsingIds(messageIds: ["id1", "id2", "id3"]);
if (messages != null) {
  print("Messages: $messages");
} else {
  print("Failed to fetch messages or error occurred");
}

Implementation

static Future<String?> getMessagesUsingIds(
    {required List<String> messageIds}) {
  return FlyChatFlutterPlatform.instance.getMessagesUsingIds(messageIds);
}