Browse SDKs · Flutter
Platform
SDKsFlutter

Set group member extension

Configure custom business extension strings for a group member using the OpenIM Flutter SDK.

Copy

Attach custom business extension strings to a group member (such as member titles, internal badge tags, or position markers):

Parameters

ParameterTypeRequiredDescription
groupIDStringYesTarget group ID.
userIDStringYesTarget member user ID.
exStringYesCustom extension string, typically formatted as a JSON string.

Code example

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

The ex attribute is overwritten completely; the SDK does not merge nested JSON properties automatically. If storing multi-attribute data, read the existing extension value, merge properties in the application layer, and write back the entire serialized string.

Return value

A successful Future indicates that the member extension string has been updated on the server.

State changes after the call

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