sendCustomMessage method

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

发送自定义消息

Implementation

@override
Future<V2TimValueCallback<V2TimMessage>> sendCustomMessage({
  required String data,
  required String receiver,
  required String groupID,
  int priority = 0,
  String desc = "",
  String extension = "",
  bool onlineUserOnly = false,
  bool isExcludedFromUnreadCount = false,
  Map<String, dynamic>? offlinePushInfo,
}) async {
  return V2TimValueCallback<V2TimMessage>.fromJson(
    formatJson(
      await _channel.invokeMethod(
        "sendCustomMessage",
        buildMessageMangerParam(
          {
            "data": data,
            "receiver": receiver,
            "groupID": groupID,
            "priority": priority,
            "desc": desc,
            "extension": extension,
            "onlineUserOnly": onlineUserOnly,
            "isExcludedFromUnreadCount": isExcludedFromUnreadCount,
            "offlinePushInfo": offlinePushInfo,
          },
        ),
      ),
    ),
  );
}