Browse SDKs · Flutter
Platform
SDKsFlutter

Quit a group

Leave an OpenIM group as a member or administrator in the Flutter SDK.

Copy

Regular members or administrators invoke this method to leave a specified group:

Parameters

ParameterTypeRequiredDescription
groupIDStringYesTarget group ID.

Code example

await OpenIM.iMManager.groupManager.quitGroup(groupID: groupID);

Return value

A successful Future indicates that the leave request has been processed by the server. The group owner cannot quit directly; the owner must first Transfer group owner.

State changes after the call

Upon leaving, remove the group from the local joined group list. Multi-device synchronization triggers the onJoinedGroupDeleted callback. The client uses groupID as the key to update group state. For complete listener integration, see Groups overview. Leaving a group preserves local historical conversation records; to delete conversations, see conversation deletion APIs.