initialCurrentUser method

Future<void> initialCurrentUser()

Implementation

Future<void> initialCurrentUser() async {
  TUILoginUserInfo loginUserInfo = TUIRoomEngine.getSelfInfo();
  var getCurrentUserResult =
      await RoomEngineManager().getUserInfo(loginUserInfo.userId);
  currentUser.userName.value = getCurrentUserResult.data!.userName;
  currentUser.userId.value = getCurrentUserResult.data!.userId;
  currentUser.userRole.value = getCurrentUserResult.data!.userRole;
  currentUser.userAvatarURL.value = getCurrentUserResult.data!.avatarUrl;
}