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