getLastNUnreadMessages method
This method is used to get the unread message count.
Implementation
@override
Future<String?> getLastNUnreadMessages(int messagesCount) async {
String? res;
try {
res = await mirrorFlyMethodChannel.invokeMethod(
'getLastNUnreadMessages', {"messagecount": messagesCount});
return convertChatMessagesJsonFromString(res);
} on PlatformException catch (e) {
LogMessage.d("Platform Exception =", " $e");
rethrow;
} on Exception catch (error) {
LogMessage.d("Exception ", " $error");
rethrow;
}
}