UserService class

Constructors

UserService()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
onBlackListChanged Stream<void>
getter/setter pair
onFriendAddedOrUpdated Stream<List<NIMFriend>>
getter/setter pair
onFriendDeleted Stream<List<String>>
getter/setter pair
onMuteListChanged Stream<NIMMuteListChangedNotify>
getter/setter pair
onUserInfoChange Stream<List<NIMUser>>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

ackAddFriend({required String userId, bool isAgree = true, String? idServer}) Future<NIMResult<void>>
确认添加好友, idServer仅为web端系统消息的id
addFriend({required String userId, String? message, required NIMVerifyType verifyType}) Future<NIMResult<void>>
添加好友
addToBlackList(String userId) Future<NIMResult<void>>
deleteFriend({required String userId, bool includeAlias = true}) Future<NIMResult<void>>
删除好友
fetchUserInfoList(List<String> userIdList) Future<NIMResult<List<NIMUser>>>
从云端获取用户资料(每次最多获取150个用户,如果量大,上层请自行分批获取) 通过用户账号列表userIdList查询并返回所有用户的资料列表
getAllUserInfoAndroid() Future<NIMResult<List<NIMUser>>>
从本地数据库中批量获取用户资料
getBlackList() Future<NIMResult<List<String>>>
getCurrentAccount() Future<NIMResult<String?>>
获取当前登录的帐号 如果未登录返回为空或者null
getFriend(String userId) Future<NIMResult<NIMFriend>>
获取好友
getFriendAccountsAndroid() Future<NIMResult<List<String>>>
获取所有的好友帐号
getFriendList() Future<NIMResult<List<NIMFriend>>>
获取好友列表
getMuteList() Future<NIMResult<List<String>>>
getUserInfo(String userId) Future<NIMResult<NIMUser>>
从本地数据库中获取用户资料 通过用户账号userId查询并返回该用户的资料
getUserInfoListAndroid(List<String> userIdList) Future<NIMResult<List<NIMUser>>>
从本地数据库中批量获取用户资料 通过用户账号列表userIdList查询并返回所有用户的资料列表
isInBlackList(String userId) Future<NIMResult<bool>>
isMute(String userId) Future<NIMResult<bool>>
isMyFriend(String userId) Future<NIMResult<bool>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeFromBlackList(String userId) Future<NIMResult<void>>
searchAccountByAliasAndroid(String alias) Future<NIMResult<List<String>>>
根据备注反查账号
searchFriendsByKeywordAndroid(String keyword) Future<NIMResult<List<NIMFriend>>>
搜索与关键字匹配的所有好友
searchUserIdListByNick(String nick) Future<NIMResult<List<String>>>
根据昵称反查账号列表 通过昵称nick反查账号列表
searchUserInfoListByKeyword(String keyword) Future<NIMResult<List<NIMUser>>>
搜索与关键字匹配的所有用户 通过关键字keyword,返回与之匹配的所有的用户列表
setMute({required String userId, required dynamic isMute}) Future<NIMResult<void>>
toString() String
A string representation of this object.
inherited
updateFriend({required String userId, required String alias}) Future<NIMResult<void>>
updateMyUserInfo(NIMUser user) Future<NIMResult<void>>
更新本人用户资料 修改为user提供的内容

Operators

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