Browse SDKs · Flutter
SDKsFlutter

Retrieve the current user’s profile

Retrieve the current logged-in user’s profile with the OpenIM Flutter SDK.

Copy
final user = await OpenIM.iMManager.userManager.getSelfUserInfo();
setCurrentUser(user);

The Future returns the current account's UserInfo. Use it to initialize the avatar, nickname, and settings UI. This query does not trigger a profile callback. Clear the previous snapshot when the user logs out or switches accounts.