YTIM class

YTIM 核心类

Constructors

YTIM()
factory

Properties

appSecret String
no setter
currentChatUserId String
当前正在与之聊天的用户id。
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
mUser IMUser
自己的用户信息
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
streamController StreamController?
no setter

Methods

addKickOutCallback(KickOutCallback callback) → void
添加被踢出回调
addUser(String account, String username, {String? headImg}) Future
创建用户
checkConnectStatus() → void
检查连接状态
deleteSession(String tid) → void
删除会话记录
deleteUser(int userId) Future
删除用户
editUser(String userId, String username, {int? sex, String? headImg, String? phone, String? email}) Future
修改IM用户信息
getHistoryMessage(String tid) → void
获取历史消息列表
getProfile(String userId) → void
获取用户资料 userId 对方userId
getTimeHistoryMessage(String tid, String time) → void
获取最后一条时间内历史消息列表 默认获取50条
getUnreadMessage() → void
获取未读消息
getUnreadMessageCount(int userId) Future<int>
获取未读消息数
getUserList({String? order}) → void
获取联系人列表 "order":"排序(1:按会话记录,2:按会话记录(只取有过会话的用户列表),3:在线状态,4:按用户名称)"
init({required String imAppID, required String imAppSecret, required String imAccount, required Callback<IMUser> imUserCreatedCallback, required Callback<IMUser> imLoginSuccessCallback, String imUsername = '', String imHeadImg = '', String password = '000000', bool logEnabled = true}) → void
IM初始化。
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
on<T>() Stream<T>
release() → void
释放连接
revokeMessage(String tIMId, String? timestamp) → void
撤销消息 tIMId 通知对方imid timestamp 消息时间戳
send(String tid, String? tName, String content) → void
发送消息
sendACK(String tid) → void
返回已读回执
toString() String
A string representation of this object.
inherited

Operators

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