changeOwner method
转让群主。 仅群主有权限调用。
Param groupId 群组 ID。
Param newOwner 新群主。
Return 无。
Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 ChatError.
Implementation
Future<void> changeOwner(
String groupId,
String newOwner,
) async {
try {
Map req = {'groupId': groupId, 'owner': newOwner};
Map result = await platform_interface.Client.instance.groupManager
.callNativeMethod(ChatMethodKeys.updateGroupOwner, req);
ChatError.hasErrorFromResult(result);
} catch (e) {
rethrow;
}
}