Browse SDKs · Flutter
Platform
SDKsFlutter

Check friendship

Verify friendship relationships with specified users using the OpenIM Flutter SDK.

Copy

Check the friendship relationship status between the currently signed-in user and a list of candidate user IDs:

Parameters

ParameterTypeRequiredDescription
userIDListList<String>YesList of target user IDs to verify for friendship.

Code example

final checks = await OpenIM.iMManager.friendshipManager.checkFriend(
  userIDList: ['user_a', 'user_b'],
);

Return value

A successful Future returns a list of friendship check results (List<FriendshipInfo>).

Each FriendshipInfo item includes the target userID and an integer result: result == 1 indicates an active bilateral friendship, while other values indicate non-friend status.

This method performs a lightweight relation check; it does not return friend remarks, signatures, or custom extensions, nor does it emit listener events. To retrieve complete friend profile details, see Get friends info.