EMContactManager class
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
-
acceptInvitation({String userName, dynamic onSuccess(), dynamic onError(int code, String desc) })
→ void
-
接受加好友的邀请
userName
.
如果添加成功,请调用onSuccess
,如果出现错误,请调用onError
。
-
addContact({String userName, String reason, dynamic onSuccess(), dynamic onError(int code, String desc) })
→ void
-
添加联系人
userName
with reason
.
如果添加成功,请调用onSuccess
,如果出现错误,请调用onError
。
-
addContactListener(EMContactEventListener contactListener)
→ void
-
设置好友监听器
contactListener
-
addUserToBlackList({String userName, bool both: false, dynamic onSuccess(), dynamic onError(int code, String desc) })
→ void
-
把指定用户加入到黑名单中
userName
.
如果both
设置为true,则双方都无法向对方发送消息。否则,userName
仍然可以接收消息。
如果加入成功,请调用onSuccess
,如果出现错误,请调用onError
。
-
declineInvitation({String userName, dynamic onSuccess(), dynamic onError(int code, String desc) })
→ void
-
拒绝加好友的邀请
userName
.
如果添加成功,请调用onSuccess
,如果出现错误,请调用onError
。
-
deleteContact({String userName, bool keepConversation: false, dynamic onSuccess(), dynamic onError(int code, String desc) })
→ void
-
删除联系人
userName
keepConversation
true 保留会话和消息 false 不保留
如果添加成功,请调用onSuccess
,如果出现错误,请调用onError
。
-
getAllContactsFromServer({dynamic onSuccess(List<String> contacts), dynamic onError(int code, String desc) })
→ void
-
从服务器获取所有的好友
如果获取成功,请调用
onSuccess
,如果出现错误,请调用onError
。
-
getBlackListFromServer({dynamic onSuccess(List<String> blackList), dynamic onError(int code, String desc) })
→ void
-
从服务器获取黑名单中的用户的ID
如果获取成功,请调用
onSuccess
,如果出现错误,请调用onError
。
-
getBlackListUserNames()
→ List<String>
-
从本地获取黑名单中的用户的ID
-
removeContactListener(EMContactEventListener contactListener)
→ void
-
移除好友监听器
contactListener
-
removeUserFromBlackList({String userName, dynamic onSuccess(), dynamic onError(int code, String desc) })
→ void
-
把用户从黑名单中移除
userName
.
如果移除成功,请调用onSuccess
,如果出现错误,请调用onError
。
-
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