ZegoUser class

用户对象

配置用户 ID 和用户名,用于标识房间内的用户。 注意 userID 在同一个 appID 下需唯一,否则登录房间时会出现互踢的情况。 强烈建议 userID 与业务 APP 的用户 ID 一一对应,即一个 userID 与一个真实用户是固定且唯一的,而不应该是以随机的 userID 的方式传给 SDK 的方式。因为唯一且固定的 userID 可以让 ZEGO 技术人员快速定位线上问题。

Constructors

ZegoUser(String userID, String userName)
ZegoUser.id(String userID)
创建用户对象

Properties

hashCode → int
The hash code for this object.
read-onlyinherited
runtimeType → Type
A representation of the runtime type of the object.
read-onlyinherited
userID ↔ String
用户 ID,最大 64 字节的utf8编码字符串。隐私保护声明:请勿在此字段填写用户敏感信息,包括但不限于手机号、身份证号、护照编号、真实姓名等。注意事项:仅支持数字,英文字符 和 '~', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', '=', '-', '`', ';', '’', ',', '.', '<', '>', '\'。如果需要与 Web SDK 互通,请不要使用 '%'。
read / write
userName ↔ String
用户名,最大长度不超过 256 字节的utf8编码字符串。请勿在此字段填写用户敏感信息,包括但不限于手机号、身份证号、护照编号、真实姓名等。
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited