fetchJoinedGroupCount method
~english Gets the number of groups joined by the current user from the server.
Returns The count of joined groups.
Throws Exception description, see ChatError.
~end
~chinese 从服务器获取当前用户已加入的群组数量。
Return 已加入的群组数量。
Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 ChatError。
~end
Implementation
Future<int> fetchJoinedGroupCount() async {
try {
Map result = await platform_interface.Client.instance.groupManager
.callNativeMethod(ChatMethodKeys.fetchJoinedGroupCount);
ChatError.hasErrorFromResult(result);
int count = result[ChatMethodKeys.fetchJoinedGroupCount];
return count;
} catch (e) {
rethrow;
}
}