joinGroup method
当前登录用户加入公开群(如果是自由加入的公开群,直接进入群组)
Implementation
void joinGroup({
final String groupId,
onSuccess(),
onError(int errorCode, String desc)}){
Future<Map<String, dynamic>> result = _emGroupManagerChannel
.invokeMethod(EMSDKMethod.joinGroup, {"groupId" : groupId});
result.then((response){
if (response['success']) {
if (onSuccess != null) {
onSuccess();
}
} else {
if (onError != null) onError(response['code'], response['desc']);
}
});
}