ChatLib class
Methods
-
callWebSocket()
→ void
-
兼容旧方法名
-
composeALocalMessage(String textMsg)
→ Message
-
通过指定的文本内容,创建消息实体。一般用于UI层对用户显示的自定义消息(该方法并未调用socket发送消息)。
如需发送至后端,需获取返回的消息实体,再调用发送方法
@param textMsg
-
deleteMessage(Int64 msgId)
→ void
-
删除消息
@param msgId 消息ID
-
disconnect()
→ void
-
关闭socket连接,在停止使用时,需调用该方法。
-
dispose()
→ void
-
-
initialize({required int userId, required String cert, required String token, required String baseUrl, required String sign, int chatId = 0, String custom = '', int maxSessionMinutes = 900000})
→ void
-
-
makeConnect()
→ void
-
启动socket连接
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
resendMSg(String msg, Int64 consultId, Int64 payloadId, {Int64 replyMsgId = Int64.ZERO, MessageFormat type = MessageFormat.MSG_TEXT, WithAutoReply? withAutoReply = null})
→ void
-
重发消息
@param cMsg: Message
@param payloadId: Long
-
resetSessionTime()
→ void
-
-
sendMessage(String msg, MessageFormat type, Int64 consultId, {Int64 replyMsgId = Int64.ZERO, WithAutoReply? withAutoReply = null, Int64 payload_Id = Int64.ZERO, String fileName = '', int fileSize = 0})
→ void
-
发送文本类型、图片类型的消息
@param msg 消息内容或图片url,音频url..。
-
sendVideoMessage(String url, String thumbnail, String hlsUri, Int64 consultId, {Int64 replyMsgId = Int64.ZERO, WithAutoReply? withAutoReply = null, Int64 payload_Id = Int64.ZERO})
→ void
-
发送视频类型的消息
@param url 视频地址
-
toString()
→ String
-
A string representation of this object.
inherited