Browse SDKs · Flutter
Platform
SDKsFlutter

Set group member avatar

Update the in-group avatar for a specified group member using the OpenIM Flutter SDK.

Copy

Update the dedicated avatar displayed for a group member within the context of a specific group:

Parameters

ParameterTypeRequiredDescription
groupIDStringYesTarget group ID.
userIDStringYesTarget member user ID.
faceURLStringYesNew avatar URL to display for the member in this group.

Code example

await OpenIM.iMManager.groupManager.setGroupMemberInfo(
  groupMembersInfo: SetGroupMemberInfo(
    groupID: groupID,
    userID: targetUserID,
    faceURL: avatarURL,
  ),
);

An in-group avatar applies only within this specific group and does not modify the user's account-wide profile avatar. To update an account's global avatar, see Update self profile.

Return value

A successful Future indicates that the in-group avatar has been saved on the server.

State changes after the call

Connected clients in the group receive member profile update events. The client updates the local member avatar using groupID:userID as the key. For complete listener integration, see Retrieving group members overview.