updateGroupName method

Future<void> updateGroupName(
  1. String groupId,
  2. String name
)

Changes the group name. Only the group owner can call this method.

Param groupId The group ID. Param name The new group name.

Returns None.

Throws Exception description, see ChatError.

Implementation

Future<void> updateGroupName(
  String groupId,
  String name,
) async {
  Map req = {'name': name, 'groupId': groupId};
  Map result = await platform_interface.Client.instance.groupManager
      .callNativeMethod(ChatMethodKeys.updateGroupSubject, req);
  try {
    ChatError.hasErrorFromResult(result);
  } catch (e) {
    rethrow;
  }
}