sendCustomMessage method

Future<V2TimValueCallback<V2TimMessage>> sendCustomMessage({
  1. required String data,
  2. required String receiver,
  3. String? groupID,
  4. int? priority = 0,
  5. String? desc = "",
  6. String? extension = "",
  7. bool onlineUserOnly = false,
})

发送自定义消息

Implementation

Future<V2TimValueCallback<V2TimMessage>> sendCustomMessage({
  required String data,
  required String receiver,
  String? groupID,
  int? priority = 0,
  String? desc = "",
  String? extension = "",
  bool onlineUserOnly = false,
}) async {
  return V2TimValueCallback<V2TimMessage>.fromJson(
    _formatJson(
      await _channel.invokeMethod(
        "sendCustomMessage",
        _buildParam(
          {
            "data": data,
            "receiver": receiver,
            "groupID": groupID,
            "priority": priority,
            "desc": desc,
            "extension": extension,
            "onlineUserOnly": onlineUserOnly,
          },
        ),
      ),
    ),
  );
}