UserService class Null safety
Constructors
- UserService()
-
factory
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
-
onBlackListChanged
↔ Stream<
void> -
read / write
-
onFriendAddedOrUpdated
↔ Stream<
List< NIMFriend> > -
read / write
-
onFriendDeleted
↔ Stream<
List< String> > -
read / write
-
onMuteListChanged
↔ Stream<
void> -
read / write
-
onUserInfoChange
→ Stream<
List< NIMUser> > -
read-only
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
ackAddFriend(
{required String userId, bool isAgree = true}) → Future< NIMResult< void> > - 确认添加好友
-
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
查询并返回所有用户的资料列表 -
getBlackList(
) → Future< NIMResult< List< >String> > -
getFriend(
String userId) → Future< NIMResult< NIMFriend> > - 获取好友
-
getFriendList(
) → Future< NIMResult< List< >NIMFriend> > - 获取好友列表
-
getMuteList(
) → Future< NIMResult< List< >String> > -
getUserInfo(
String userId) → Future< NIMResult< NIMUser> > -
从本地数据库中获取用户资料
通过用户账号
userId
查询并返回该用户的资料 -
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 non-existent method or property is accessed. [...]
inherited
-
removeFromBlackList(
String userId) → Future< NIMResult< void> > -
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