ImageMessage.fromPartial constructor

ImageMessage.fromPartial({
  1. required User author,
  2. int? createdAt,
  3. required String id,
  4. required PartialImage partialImage,
  5. String? remoteId,
  6. String? roomId,
  7. bool? showStatus,
  8. Status? status,
  9. int? updatedAt,
})

Creates a full image message from a partial one.

Implementation

factory ImageMessage.fromPartial({
  required User author,
  int? createdAt,
  required String id,
  required PartialImage partialImage,
  String? remoteId,
  String? roomId,
  bool? showStatus,
  Status? status,
  int? updatedAt,
}) =>
    _ImageMessage(
      author: author,
      createdAt: createdAt,
      height: partialImage.height,
      id: id,
      metadata: partialImage.metadata,
      name: partialImage.name,
      remoteId: remoteId,
      repliedMessage: partialImage.repliedMessage,
      roomId: roomId,
      showStatus: showStatus,
      size: partialImage.size,
      status: status,
      type: MessageType.image,
      updatedAt: updatedAt,
      uri: partialImage.uri,
      width: partialImage.width,
    );