Browse SDKs · Flutter
Platform
SDKsFlutterIncludes Enterprise features

Users overview

Understand user profiles, friendship relations, blocklists, and presence status in OpenIMClientSDK.

Copy

The OpenIM Flutter SDK identifies users by their userID. When implementing user profile cards, friend discovery, contact directories, or blocklists, differentiate between public user profiles, friend relationships maintained by the current account, and blocklist states.

Group member rosters, in-group nicknames, group roles, and membership administration belong to the group domain; see Retrieving group members overview.

User data models

OpenIM returns distinct user data structures depending on the operational context:

ModelTarget Use CaseAssociated Guides
UserInfoCurrently logged-in user profile, account settings, self avatar, nickname, and global message reception settings.Get self profile, Update self profile
PublicUserInfoUser search, friend discovery candidates, stranger profile cards.Retrieve users
FriendInfoFriend list entries for the current user, friend remarks, and friendship custom extensions. (Note: the Dart model does not contain isPinned).Get friend list with pagination, Get friends info
BlacklistInfoUsers blocked by the current account.Retrieve a list of blocked users, Block a user, Unblock a user
UserStatusInfoReal-time presence status and active platform indicators.Subscribe to user status, Get subscribed user status

A single userID can exist simultaneously in public directories, the friend roster, the blocklist, and group rosters. Prioritize FriendInfo when rendering contacts; use PublicUserInfo when displaying stranger profiles; and use GroupMembersInfo in group contexts. For conversation list titles and chat headers, use ConversationInfo.showName.

Functional directory

RequirementRecommended Guide
Query public profiles by userID for friend discovery or profile cardsRetrieve users
Paginate, search, or inspect friend relationshipsGet friend list with pagination
Send, query, accept, or reject friend applicationsGet friend application list as recipient
Modify friend remarks and relationship extensionsUpdate friends
Remove friend relationshipsDelete a friend
View and manage the blocklistRetrieve a list of blocked users
Read or update the current user's nickname, avatar, and extensionsUpdate self profile
Configure account-wide message reception and DND rulesSet global message reception
Subscribe to and inspect user presenceSubscribe to user status
Retrieve group member lists, member search, or specific member detailsRetrieving group members overview

State management and listeners

Listen to and merge user domain events within their respective capability handlers:

UserManager and FriendshipManager each maintain a single listener instance in the Flutter SDK. Assemble all required callbacks centrally in an application-level state provider and register each listener once to prevent individual Widgets from overwriting one another.