SubscriptionManager class
订阅在线状态管理
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
subscriptionUsers
→ List<
String> -
no setter
Methods
-
addSubscriptionUser(
String accountId) → void - 添加订阅用户 只操作数据
-
getCachedUserStatus(
String accountId) → NIMUserStatus? - 获取缓存的用户状态
-
init(
) → void - 初始化
-
isUserOnline(
String accountId) → bool? - 获取缓存中用户是否在线
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeSubscriptionUser(
String accountId) → void - 移除订阅用户 只操作数据
-
subscribeUserStatus(
List< String> accountIds, {void onCachedStatusAvailable(List<NIMUserStatus> cachedStatuses)?}) → void -
订阅用户在线状态
时长7天
订阅后立即返回一次状态
onCachedStatusAvailable回调,对于已有缓存状态的用户立即回调, 解决 NIM SDK 重复订阅不会立即返回状态的问题 -
toString(
) → String -
A string representation of this object.
inherited
-
unsubscribeAll(
) → Future< NIMResult< void> > - 取消所以订阅的用户
-
unsubscribeUserStatus(
List< String> accountIds) → void - 取消订阅用户在线状态
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → SubscriptionManager
-
final