changeOwner method Null safety
Transfers the chat room ownership.
Only the chat room owner can call this method.
Param roomId
The chat room ID.
Param newOwner
The ID of the new chat room owner.
Throws A description of the exception. See {@link EMError}.
Implementation
Future<void> changeOwner(
String roomId,
String newOwner,
) async {
Map req = {"roomId": roomId, "newOwner": newOwner};
Map result =
await _channel.invokeMethod(ChatMethodKeys.changeChatRoomOwner, req);
try {
EMError.hasErrorFromResult(result);
} on EMError catch (e) {
throw e;
}
}