sendFileMessage method Null safety
- {required String sessionId,
- required NIMSessionType sessionType,
- required String filePath,
- int? fileSize,
- required String displayName,
- NIMNosScene nosScene = NIMNosScenes.defaultIm,
- bool resend = false,
- MessageAction? action}
Send a file (document) message.
Implementation
Future<NIMResult<NIMMessage>> sendFileMessage({
required String sessionId,
required NIMSessionType sessionType,
required String filePath,
int? fileSize,
required String displayName,
NIMNosScene nosScene = NIMNosScenes.defaultIm,
bool resend = false,
MessageAction? action,
}) async {
var message = NIMMessage.fileEmptyMessage(
sessionId: sessionId,
sessionType: sessionType,
filePath: filePath,
fileSize: fileSize,
displayName: displayName,
nosScene: nosScene);
return _createMessageAndSend(message, action, resend);
}