ChatMessage.createFileSendMessage constructor Null safety
Creates a file message for sending.
Param targetId The ID of the message recipient.
- For a one-to-one chat, it is the username of the peer user.
- For a group chat, it is the group ID.
- For a chat room, it is the chat room ID.
Param filePath The file path.
Param displayName The file name.
Param fileSize The file size in bytes.
Return The message instance.
Implementation
ChatMessage.createFileSendMessage({
required String targetId,
required String filePath,
String? displayName,
ChatType chatType = ChatType.Chat,
int? fileSize,
}) : this.createSendMessage(
chatType: chatType,
to: targetId,
body: ChatFileMessageBody(
localPath: filePath,
fileSize: fileSize,
displayName: displayName,
));