ImageMessage constructor

ImageMessage({
  1. required String content,
  2. String? name,
  3. String? size,
})

Creates a new instance of ImageMessage.

content is the actual data content of the image encoded in base64 format.

name is the name of the image file.

size is the size of the image file

Implementation

ImageMessage({
  required String content,
  String? name,
  String? size,
}) : super(
        type: MessageType.IMAGE,
        content: jsonEncode({
          'content': content,
          'name': name,
          'size': size,
        }),
      );