getUnreadMessagesCount method

  1. @override
Future<int?> getUnreadMessagesCount()
override

This method is used to get the unread message count.

Implementation

@override
Future<int?> getUnreadMessagesCount() async {
  int? res;
  try {
    res = await mirrorFlyMethodChannel
        .invokeMethod<int>('getUnreadMessagesCount');
    return res;
  } on PlatformException catch (e) {
    LogMessage.d("Platform Exception =", " $e");
    rethrow;
  } on Exception catch (error) {
    LogMessage.d("Exception ", " $error");
    rethrow;
  }
}