messagesCount method

Future<int> messagesCount()

Message count

Implementation

Future<int> messagesCount() async {
  Map req = this._toJson();
  Map<String, dynamic> result = await _emConversationChannel.invokeMethod(
    ChatMethodKeys.messageCount,
    req,
  );

  try {
    ChatError.hasErrorFromResult(result);
    int count = result[ChatMethodKeys.messageCount];
    return count;
  } on ChatError catch (e) {
    throw e;
  }
}