createFileMessage method Null safety
- {required String sessionId,
- required NIMSessionType sessionType,
- required String filePath,
- int? fileSize,
- required String displayName,
- NIMNosScene nosScene = NIMNosScenes.defaultIm}
Create a file (document) message.
Implementation
static Future<NIMResult<NIMMessage>> createFileMessage(
{required String sessionId,
required NIMSessionType sessionType,
required String filePath,
int? fileSize,
required String displayName,
NIMNosScene nosScene = NIMNosScenes.defaultIm}) async {
var message = NIMMessage.fileEmptyMessage(
sessionId: sessionId,
sessionType: sessionType,
filePath: filePath,
fileSize: fileSize,
displayName: displayName,
nosScene: nosScene);
return NimCore.instance.messageService._createMessage(message: message);
}