CustomMessage.fromPartial constructor

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

Creates a full custom message from a partial one.

Implementation

factory CustomMessage.fromPartial({
  required User author,
  int? createdAt,
  required String id,
  required PartialCustom partialCustom,
  String? remoteId,
  String? roomId,
  bool? showStatus,
  Status? status,
  int? updatedAt,
}) =>
    _CustomMessage(
      author: author,
      createdAt: createdAt,
      id: id,
      metadata: partialCustom.metadata,
      remoteId: remoteId,
      repliedMessage: partialCustom.repliedMessage,
      roomId: roomId,
      showStatus: showStatus,
      status: status,
      type: MessageType.custom,
      updatedAt: updatedAt,
    );