updateGroupName method

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

修改群组名称。 仅群主有权限调用。

Param groupId 群组 ID。 Param name 新的群组名称。

Return 无。

Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 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;
  }
}