unsubscribe method
~english Unsubscribes from a user's presence states.
Param members
The array of IDs of users whose presence states you want to unsubscribe from.
Throws A description of the exception. See ChatError. ~end
~chinese 取消订阅指定用户的在线状态。
Param members
要取消订阅在线状态的用户 ID 数组。
Throws 如果有方法调用的异常会在这里抛出,可以看到具体错误原因。参见 ChatError。 ~end
Implementation
Future<void> unsubscribe({
required List<String> members,
}) async {
Map req = {'members': members};
Map result =
await _channel.invokeMethod(ChatMethodKeys.presenceUnsubscribe, req);
try {
ChatError.hasErrorFromResult(result);
} on ChatError catch (e) {
throw e;
}
}