sendFileMessage method

  1. @override
Future<V2TimValueCallback<V2TimMessage>> sendFileMessage({
  1. required String filePath,
  2. required String fileName,
  3. required String receiver,
  4. required String groupID,
  5. int priority = 0,
  6. bool onlineUserOnly = false,
  7. bool isExcludedFromUnreadCount = false,
  8. Map<String, dynamic>? offlinePushInfo,
  9. Uint8List? fileContent,
})
override

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

Implementation

@override
Future<V2TimValueCallback<V2TimMessage>> sendFileMessage(
    {required String filePath,
    required String fileName,
    required String receiver,
    required String groupID,
    int priority = 0,
    bool onlineUserOnly = false,
    bool isExcludedFromUnreadCount = false,
    Map<String, dynamic>? offlinePushInfo,
    Uint8List? fileContent}) async {
  return await _v2timMessageManager.sendFileMessage<V2TimValueCallback<V2TimMessage>, V2TimMessage>({
    "filePath": filePath,
    "fileName": fileName,
    "receiver": receiver,
    "groupID": groupID,
    "priority": priority,
    "onlineUserOnly": onlineUserOnly,
    "isExcludedFromUnreadCount": isExcludedFromUnreadCount,
    "offlinePushInfo": offlinePushInfo,
    "fileContent": fileContent
  });
}