createSession method

Future<NIMResult<NIMSession>> createSession({
  1. required String sessionId,
  2. required NIMSessionType sessionType,
  3. int tag = 0,
  4. required int time,
  5. bool linkToLastMessage = false,
})

创建一条空的联系人会话,并保存到数据库中
sessionId - 会话id ,对方帐号或群组id。
sessionType - 会话类型
tag - 会话tag , eg:置顶标签(UIKit中的实现: RECENT_TAG_STICKY) ,用户参照自己的tag 实现即可, 如不需要,传 0 即可
time - 会话时间 ,单位为ms。
linkToLastMessage - 是否放入最后一条消息的相关信息

Implementation

/// <br> [sessionId] - 会话id ,对方帐号或群组id。
/// <br> [sessionType] - 会话类型
/// <br> [tag] - 会话tag , eg:置顶标签(UIKit中的实现: RECENT_TAG_STICKY) ,用户参照自己的tag 实现即可, 如不需要,传 0 即可
/// <br> [time] - 会话时间 ,单位为ms。
/// <br> [linkToLastMessage] - 是否放入最后一条消息的相关信息
Future<NIMResult<NIMSession>> createSession({
  required String sessionId,
  required NIMSessionType sessionType,
  int tag = 0,
  required int time,
  bool linkToLastMessage = false,
}) {
  throw UnimplementedError('createSession() is not implemented');
}