sendTextMessage method

  1. @override
Future<V2TimValueCallback<V2TimMessage>> sendTextMessage({
  1. required String text,
  2. required String receiver,
  3. required String groupID,
  4. int priority = 0,
  5. bool onlineUserOnly = false,
  6. bool isExcludedFromUnreadCount = false,
  7. Map<String, dynamic>? offlinePushInfo,
})
override

发送高级文本消息

Implementation

@override
Future<V2TimValueCallback<V2TimMessage>> sendTextMessage({
  required String text,
  required String receiver,
  required String groupID,
  int priority = 0,
  bool onlineUserOnly = false,
  bool isExcludedFromUnreadCount = false,
  Map<String, dynamic>? offlinePushInfo,
}) async {
  Map<String, dynamic> param = {
    "text": text,
    "receiver": receiver,
    "groupID": groupID,
    "priority": priority,
    "onlineUserOnly": onlineUserOnly,
    "isExcludedFromUnreadCount": isExcludedFromUnreadCount,
    "offlinePushInfo": offlinePushInfo,
  };
  var resp = V2TimValueCallback<V2TimMessage>.fromJson(
    formatJson(
      await _channel.invokeMethod(
        "sendTextMessage",
        buildMessageMangerParam(
          param,
        ),
      ),
    ),
  );
  log("sendTextMessage", param, resp.toLogString());
  return resp;
}