Browse SDKs · Flutter
SDKsFlutter

Check friendship status

Check the friendship status of specified users with the OpenIM Flutter SDK.

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

The Future returns List<FriendshipInfo>. In each item, userID identifies the target and result == 1 means the target is a friend and is not in the blocklist. Do not invent additional states that the pinned SDK does not declare.

This method returns the current relationship state and does not trigger the friendship listener. To retrieve remarks, avatars, or relationship extension data, see Retrieve specified friend profiles.