sendFileMessage method

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

发送文件 web 端 fileName、fileContent 为必传字段

Implementation

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