changeOwner method

Future<void> changeOwner(
  1. String groupId,
  2. String newOwner

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 ChatError.


Future<void> changeOwner(
  String groupId,
  String newOwner,
) async {
  Map req = {'groupId': groupId, 'owner': newOwner};
  Map result =
      await _channel.invokeMethod(ChatMethodKeys.updateGroupOwner, req);
  try {
  } on ChatError catch (e) {
    throw e;