setGroupMemberRole method Null safety
- {required String groupID,
- required String userID,
- required GroupMemberRoleTypeEnum role}
Set the role for a group member
Note:
Public group and Meeting group: Only the group owner can switch roles between ordinary members and administrators for group members.
Other groups do not support setting group member roles.
To transfer a group, please call the transferGroupOwner interface.
公开群(Public)和会议群(Meeting):只有Group owner才能对群成员进行Common member和Admin之间的角色切换。
其他群不支持设置群成员角色。
转让群组请调用 transferGroupOwner 接口。
Parameter
role Switched roles support: V2TIMGroupMemberFullInfo.V2TIM_GROUP_MEMBER_ROLE_MEMBER: common group member V2TIMGroupMemberFullInfo.V2TIM_GROUP_MEMBER_ROLE_ADMIN: administrator
Implementation
Future<V2TimCallback> setGroupMemberRole({
required String groupID,
required String userID,
required GroupMemberRoleTypeEnum role,
}) async {
return ImFlutterPlatform.instance.setGroupMemberRole(
groupID: groupID,
userID: userID,
role: EnumUtils.convertGroupMemberRoleTypeEnum(role));
}