EMClient class

Constructors

EMClient.getInstance()
factory

Properties

hashCode → int
The hash code for this object. [...]
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

addConnectionListener(EMConnectionListener listener) → void
添加链接状态监听的接口listener.
createAccount({String userName, String password, dynamic onSuccess(), dynamic onError(int errorCode, String desc) }) → void
注册环信账号userName/password. 如果注册成功,请调用onSuccess,如果出现错误,请调用onError
getCurrentUser() → Future<String>
获取当前用户名 如果尚未成功登录IM服务器,则返回null
init(EMOptions options) → void
初始化SDK 指定options .
isConnected() → bool
检查是否连接到聊天服务器
isLoggedInBefore() → Future<bool>
判断当前是否登录 true 已登录 false 未登录
login({String userName, String password, dynamic onSuccess(String username), dynamic onError(int errorCode, String desc) }) → void
账号密码登录id/password. 如果登录成功,请调用onSuccess,如果出现错误,请调用onError
logout({bool unbindToken: false, dynamic onSuccess(), dynamic onError(int code, String desc) }) → void
退出登录. unbindToken true 解除推送绑定 : false 不解除绑定 如果退出登录成功,请调用onSuccess,如果出现错误,请调用onError
removeConnectionListener(EMConnectionListener listener) → void
移除链接状态监听的接口listener.
updateCurrentUserNick(String nickName) → Future<bool>
更新当前用户的nickname 此方法主要为了在苹果推送时能够推送nick而不是userid nickName.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

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