ChatroomService class

Constructors

ChatroomService()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
independentModeLinkAddressProvider ↔ NIMChatroomIndependentModeLinkAddressProvider?
获取聊天室独立模式link地址提供者。 独立模式下需要设置该字段,否则无法进入聊天室
getter/setter pair
onEventNotified Stream<NIMChatroomEvent>
聊天室事件流
no setter
onMessageAttachmentProgressUpdate Stream<NIMAttachmentProgress>
聊天室消息附件上传/下载进度通知,以 NIMMessage.uuid 作为key
no setter
onMessageReceived Stream<List<NIMChatroomMessage>>
聊天室消息
no setter
onMessageStatusChanged Stream<NIMChatroomMessage>
聊天室消息状态变更事件
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

batchUpdateChatroomQueue({required String roomId, required List<NIMChatroomQueueEntry> entryList, bool needNotify = true, Map<String, dynamic>? notifyExtension}) Future<NIMResult<List<String>>>
批量更新聊天室队列
clearChatroomQueue(String roomId) Future<NIMResult<void>>
清空聊天室队列
downloadAttachment(NIMChatroomMessage message, [bool thumb = false]) Future<NIMResult<void>>
下载聊天室消息附件
enterChatroom(NIMChatroomEnterRequest request) Future<NIMResult<NIMChatroomEnterResult>>
加入聊天室
exitChatroom(String roomId) Future<NIMResult<void>>
退出聊天室
fetchChatroomInfo(String roomId) Future<NIMResult<NIMChatroomInfo>>
获取当前聊天室信息
fetchChatroomMembers({required String roomId, required NIMChatroomMemberQueryType queryType, required int limit, String? lastMemberAccount}) Future<NIMResult<List<NIMChatroomMember>>>
获取当前聊天室成员
fetchChatroomMembersByAccount({required String roomId, required List<String> accountList}) Future<NIMResult<List<NIMChatroomMember>>>
获取当前聊天室成员
fetchChatroomQueue(String roomId) Future<NIMResult<List<NIMChatroomQueueEntry>>>
获取聊天室队列
fetchMessageHistory({required String roomId, required int startTime, required int limit, required QueryDirection direction, List<NIMMessageType>? messageTypeList}) Future<NIMResult<List<NIMChatroomMessage>>>
获取历史消息,可选择给定时间往前或者往后查询,若方向往前,则结果排序按时间逆序,反之则结果排序按时间顺序。 拉取到的消息中也包含聊天室通知消息。
kickChatroomMember(NIMChatroomMemberOptions options) Future<NIMResult<void>>
踢掉聊天室特定成员
markChatroomMemberBeManager({required bool isAdd, required NIMChatroomMemberOptions options}) Future<NIMResult<NIMChatroomMember>>
设置/取消设置聊天室管理员
markChatroomMemberBeNormal({required bool isAdd, required NIMChatroomMemberOptions options}) Future<NIMResult<NIMChatroomMember>>
设置/取消设置聊天室普通成员
markChatroomMemberInBlackList({required bool isAdd, required NIMChatroomMemberOptions options}) Future<NIMResult<NIMChatroomMember>>
添加/移出聊天室黑名单
markChatroomMemberMuted({required bool isAdd, required NIMChatroomMemberOptions options}) Future<NIMResult<NIMChatroomMember>>
添加/解除禁言聊天室成员
markChatroomMemberTempMuted({required int duration, required NIMChatroomMemberOptions options, bool needNotify = false}) Future<NIMResult<void>>
添加/解除临时禁言聊天室成员
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pollChatroomQueueEntry(String roomId, String? key) Future<NIMResult<NIMChatroomQueueEntry>>
从列表中删除某个元素
sendChatroomAudioMessage({required String roomId, required String filePath, required int duration, NIMNosScene nosScene = NIMNosScenes.defaultIm, bool resend = false, ChatroomMessageAction? action}) Future<NIMResult<NIMChatroomMessage>>
发送聊天室音频消息
sendChatroomCustomMessage({required String roomId, NIMMessageAttachment? attachment, bool resend = false, ChatroomMessageAction? action}) Future<NIMResult<NIMChatroomMessage>>
发送聊天室自定义消息
sendChatroomFileMessage({required String roomId, required String filePath, required String displayName, NIMNosScene nosScene = NIMNosScenes.defaultIm, bool resend = false, ChatroomMessageAction? action}) Future<NIMResult<NIMChatroomMessage>>
发送聊天室文件消息
sendChatroomImageMessage({required String roomId, required String filePath, String? displayName, NIMNosScene nosScene = NIMNosScenes.defaultIm, bool resend = false, ChatroomMessageAction? action}) Future<NIMResult<NIMChatroomMessage>>
发送聊天室图片消息
sendChatroomLocationMessage({required String roomId, required double latitude, required double longitude, required String address, bool resend = false, ChatroomMessageAction? action}) Future<NIMResult<NIMChatroomMessage>>
发送聊天室地理位置消息
sendChatroomMessage(NIMChatroomMessage message, [bool resend = false]) Future<NIMResult<NIMChatroomMessage>>
发送聊天室消息
sendChatroomRobotMessage({required String roomId, required String robotAccount, required NIMRobotMessageType type, String? text, String? content, String? target, String? params, bool resend = false, ChatroomMessageAction? action}) Future<NIMResult<NIMChatroomMessage>>
创建机器人消息
sendChatroomTextMessage({required String roomId, required String text, bool resend = false, ChatroomMessageAction? action}) Future<NIMResult<NIMChatroomMessage>>
发送聊天室文本消息
sendChatroomTipMessage({required String roomId, bool resend = false, ChatroomMessageAction? action}) Future<NIMResult<NIMChatroomMessage>>
发送聊天室Tip消息
sendChatroomVideoMessage({required String roomId, required String filePath, required int duration, required int width, required int height, String? displayName, NIMNosScene nosScene = NIMNosScenes.defaultIm, bool resend = false, ChatroomMessageAction? action}) Future<NIMResult<NIMChatroomMessage>>
发送聊天室视频消息
toString() String
A string representation of this object.
inherited
updateChatroomInfo({required String roomId, required NIMChatroomUpdateRequest request, bool needNotify = true, Map<String, Object>? notifyExtension}) Future<NIMResult<void>>
更新聊天室信息。只有创建者和管理员拥有权限修改聊天室信息。 可以设置修改是否通知,若设置通知,聊天室内会收到类型为 NIMChatroomNotificationTypes.chatRoomInfoUpdated 的消息。
updateChatroomMyMemberInfo({required String roomId, required NIMChatroomUpdateMyMemberInfoRequest request, bool needNotify = true, Map<String, dynamic>? notifyExtension}) Future<NIMResult<void>>
更新聊天室内的自身信息
updateChatroomQueueEntry({required String roomId, required NIMChatroomQueueEntry entry, bool isTransient = false}) Future<NIMResult<void>>
更新聊天室队列

Operators

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