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