messagesCount method
~english Message count ~end
~chinese 会话中的消息数 ~end
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;
}
}