EMImageMessageBody constructor

EMImageMessageBody({
  1. required String localPath,
  2. String? displayName,
  3. String? thumbnailLocalPath,
  4. bool sendOriginalImage = false,
  5. int? fileSize,
  6. double? width,
  7. double? height,
})

~english Creates an image message body with an image file.

Param localPath The local path of the image file.

Param displayName The image name.

Param thumbnailLocalPath The local path of the image thumbnail.

Param sendOriginalImage The original image included in the image message to be sent.

Param fileSize The size of the image file in bytes.

Param width The image width in pixels.

Param height The image height in pixels. ~end

~chinese 用图片文件创建一个图片消息体。

Param localPath 图片文件本地路径。

Param displayName 文件名。

Param thumbnailLocalPath 图片缩略图本地路径。

Param sendOriginalImage 发送图片消息时的原始图片文件。

Param fileSize 图片文件大小,单位是字节。

Param width 图片宽度,单位为像素。

Param height 图片高度,单位为像素。 ~end

Implementation

EMImageMessageBody({
  required String localPath,
  String? displayName,
  this.thumbnailLocalPath,
  this.sendOriginalImage = false,
  int? fileSize,
  this.width,
  this.height,
}) : super(
        localPath: localPath,
        displayName: displayName,
        fileSize: fileSize,
        type: MessageType.IMAGE,
      );