SDKsFlutter
Unsubscribe from user status
Cancel online-status subscriptions with the OpenIM Flutter SDK.
await OpenIM.iMManager.userManager.unsubscribeUsersStatus(targetUserIDs);
for (final userID in targetUserIDs) {
presenceByUserID.remove(userID);
}Unsubscribe when users leave the visible range, when the page ends, or when the user switches accounts. Remove the IDs from the application's subscription set only after the Future succeeds. If it fails, retain the state so the operation can be retried.
Was this page helpful?