EMClient class Null safety

Properties

accessToken → String?
获取当前登录用户token
read-only
connected → bool
获取当前是否连接到服务器
read-only
currentUsername → String?
获取当前登录的环信id
read-only
flutterSDKVersion → String
read-only
hashCode → int
The hash code for this object. [...]
read-only, inherited
isLoginBefore → bool
获取是否登录
read-only
options EMOptions?
获取配置信息EMOptions.
read-only
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
userInfoManager EMUserInfoManager
read-only

Methods

addConnectionListener(EMConnectionListener listener) → void
添加链接状态监听的接口listener.
addCustomListener(EMCustomListener listener) → void
changeAppKey({required String newAppKey}) → Future<bool?>
修改appKey newAppKey.
compressLogs() → Future<String?>
压缩环信日志 返回日志路径
createAccount(String username, String password) → Future<String?>
注册环信id,username,password, 需要在环信后台的console中设置为开放注册才能通过sdk注册,否则只能使用rest api注册。 返回注册成功的环信id
getLoggedInDevicesFromServer({required String username, required String password}) → Future<List<EMDeviceInfo>>
获取账号名下登陆的在线设备列表 当前登录账号和密码 username/password.
init(EMOptions options) → Future<void>
初始化SDK 指定options.
kickAllDevices({required String username, required String password}) → Future<bool?>
将该账号下的所有设备都踢下线 账号和密码 username/password.
kickDevice({required String username, required String password, required String resource}) → Future<bool?>
根据设备ID,将该设备下线, 账号和密码 username/password 设备IDresource.
login(String username, String pwdOrToken, [bool isPassword = true]) → Future<String?>
使用用户名(环信id)和密码(或token)登录,username, pwdOrToken 返回登录成功的id(环信id)
logout([bool unbindDeviceToken = true]) → Future<bool?>
退出登录,是否解除deviceToken绑定unbindDeviceToken 返回退出是否成功
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
removeConnectionListener(EMConnectionListener listener) → void
移除链接状态监听的接口listener.
removeCustomListener(EMCustomListener listener) → void
toString() → String
A string representation of this object. [...]
inherited

Operators

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

Static Properties

getInstance EMClient
read-only