getMessagesOfJid method

  1. @override
Future getMessagesOfJid(
  1. String jid
)
override

Implementation

@override
Future<dynamic> getMessagesOfJid(String jid) async {
  //getChatHistory
  dynamic chatResponse;
  try {
    chatResponse = await mirrorFlyMethodChannel
        .invokeMethod('getMessagesOfJid', {"JID": jid});
    debugPrint("user Chat Result ==> $chatResponse");
    // List<ChatMessageModel> chatMessageModel = chatMessageModelFromJson(chatResponse);
    // return chatMessageModel;
    return chatResponse;
  } on PlatformException catch (e) {
    debugPrint("Platform Exception ===> $e");
    rethrow;
  } on Exception catch (error) {
    debugPrint("Exception ==> $error");
    rethrow;
  }
}