sendImageMessage method

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

发送图片消息

web 端发送图片消息时需要传入fileName、fileContent 字段

Implementation

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