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,
  10. bool? isEdited,
  11. bool? isDeleted,
  12. Map<String, String>? reactions,
})

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,
  bool? isEdited,
  bool? isDeleted,
  Map<String, String>? reactions,
}) =>
    _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,
      isEdited: isEdited ?? false,
      isDeleted: isDeleted ?? false,
      reactions: reactions ?? const {},
    );