getUserInfoByUid method Null safety

Future<UserInfo> getUserInfoByUid(
  1. int uid

Gets the user information by passing in the user ID.

After a remote user joins the channel, the SDK gets the user ID and user account of the remote user, caches them in a mapping table object (UserInfo), and triggers the RtcEngineEventHandler.userInfoUpdated callback on the local client.

After receiving the RtcEngineEventHandler.userInfoUpdated callback, you can call this method to get the user ID of the remote user from the UserInfo object by passing in the user account.

Parameter uid The user ID of the user. Ensure that you set this parameter.



Future<UserInfo> getUserInfoByUid(int uid) {
  return _invokeMethod('getUserInfoByUid', {
    'uid': uid,
  }).then((value) {
    return UserInfo.fromJson(Map<String, dynamic>.from(value));