ChatRoomService class
Constructors
-
ChatRoomService(MethodChannel methodChannel, Map<
String, Handler> handlerMap)
Properties
-
callbacks
↔ Map<
String, dynamic> -
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- receiptIdKey → String
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
buildArguments<
T> ({Map? arg, Callback< T> ? callback}) → Map<String, dynamic> -
build arguments for methodChannel
inherited
-
downloadAttachment(
ChatRoomMessage message, bool thumb, Callback< void> callback) → Future<void> - 正常情况收到消息后附件会自动下载。如果下载失败,可调用该接口重新下载。
-
enterChatRoom(
EnterChatRoomData data, int retryCount, Callback< EnterChatRoomResultData> callback, {RoomLinkAddress? linkAddress}) → Future<void> - 进入聊天室 @param data 聊天室基本数据(聊天室ID必填) @param retryCount 重试次数
-
exitChatRoom(
String roomId) → Future< void> - 离开聊天室
-
fetchRoomInfo(
String roomId, Callback< ChatRoomInfo> callback) → Future<void> - 获取当前聊天室信息
-
fetchRoomMembers(
String roomId, MemberQueryType type, ChatRoomMember member, int limit, Callback< List< callback) → Future<ChatRoomMember> >void> - 获取聊天室成员信息
-
getEnterErrorCode(
String roomId) → Future< int?> - 获取进入聊天室失败的错误码 如果是手动登录,在enterChatRoom的回调函数中已有错误码。 如果是断网重连,在自动登录失败时,即监听到在线状态变更为UNLOGIN时,可以采用此接口查看具体自动登录失败的原因。
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pullMessageHistory(
String roomId, int startTime, int limit, Callback< List< callback, {bool queryNew = false, List<ChatRoomMessage> >MsgType> ? types}) → Future<void> - 获取历史消息,可选择给定时间往前或者往后查询,以及查询指定一种或多种类型的消息。
-
sendMessage(
ChatRoomMessage message, bool resend, Callback< void> callback) → Future<void> - 发送消息
-
toString(
) → String -
A string representation of this object.
inherited
-
updateMyRoomRole(
String roomId, ChatRoomMemberUpdate update, bool needNotify, Map< String, dynamic> notifyExtension, Callback<void> callback) → Future<void> - @param roomId 聊天室id @param update 成员变更信息 @param needNotify 是否需要通知 @param notifyExtension 通知的扩展内容, dynamic需要可序列化
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited