getLastMsg static method

IMMessage? getLastMsg(
  1. String? pk
)

IM 读取与对方聊天的最后一条消息

Implementation

static IMMessage? getLastMsg(String? pk) {
  if (pk == null) {
    return null;
  }
  String? s = _spf!.getString('im_$pk');
  if (s == null) {
    return null;
  } else {
    return IMMessage.fromJson(json.decode(s));
  }
}