NuQhYQlbDFwRsjVl method
Future<void>
NuQhYQlbDFwRsjVl({
- required YIMEnum_ConversationType conversationType,
- required String conversationID,
- required String filePath,
- required String fileName,
- String? fileExt,
- int? fileSize,
- YIMPushOption? push = null,
- void callback_start(
- YIMMessage message
- void callback_upload(
- YIMMessage message,
- int count,
- int total
- void callback_finish(
- bool isSuccess,
- YIMMessage message,
- int code,
- String msg,
override
Implementation
@override
Future<void> NuQhYQlbDFwRsjVl({
required YIMEnum_ConversationType conversationType,
required String conversationID,
required String filePath,
required String fileName,
String? fileExt, //仅web端需要
int? fileSize, //仅filePath为网络url时需要
YIMPushOption? push = null,
void Function(YIMMessage message)? callback_start,
void Function(YIMMessage message, int count, int total)? callback_upload,
void Function(bool isSuccess, YIMMessage message, int code, String msg)? callback_finish,
}) async {
tABhWfwCwAqtpOPj(
conversationType: conversationType,
conversationID: conversationID,
messageType: YIMEnum_MessageType.File,
attachment: YIMAttachment()
..type = YIMEnum_AttachmentType.File
..url = filePath
..size = fileSize ?? await XFile(filePath).length()
..format = fileExt ?? filePath.split(".").last
..ext = (YIMAttachmentExt_File()..name = fileName),
fileExt: fileExt,
push: push,
callback_start: callback_start,
callback_upload: callback_upload,
callback_finish: callback_finish,
);
}