sendCustomMessage method

  1. @Deprecated('sendCustomMessage自3.6.0开始弃用,我们将创建消息与发送消息分离,请先使用createCustomMessage创建消息,再调用sendMessage发送消息')
Future<V2TimValueCallback<V2TimMessage>> sendCustomMessage({
  1. required String data,
  2. required String receiver,
  3. required String groupID,
  4. MessagePriorityEnum? priority = MessagePriorityEnum.V2TIM_PRIORITY_NORMAL,
  5. String desc = "",
  6. String extension = "",
  7. bool onlineUserOnly = false,
  8. bool isExcludedFromUnreadCount = false,
  9. OfflinePushInfo? offlinePushInfo,
})

发送自定义消息

Implementation

@Deprecated(
    'sendCustomMessage自3.6.0开始弃用,我们将创建消息与发送消息分离,请先使用createCustomMessage创建消息,再调用sendMessage发送消息')
Future<V2TimValueCallback<V2TimMessage>> sendCustomMessage({
  required String data,
  required String receiver,
  required String groupID,
  MessagePriorityEnum? priority = MessagePriorityEnum.V2TIM_PRIORITY_NORMAL,
  String desc = "",
  String extension = "",
  bool onlineUserOnly = false,
  bool isExcludedFromUnreadCount = false,
  OfflinePushInfo? offlinePushInfo,
}) async {
  return ImFlutterPlatform.instance.sendCustomMessage(
      data: data,
      receiver: receiver,
      groupID: groupID,
      priority: priority!.index,
      desc: desc,
      extension: extension,
      onlineUserOnly: onlineUserOnly,
      isExcludedFromUnreadCount: isExcludedFromUnreadCount,
      offlinePushInfo: offlinePushInfo?.toJson());
}