Message constructor

Message({
  1. String? id,
  2. String? conversationId,
  3. User? author,
  4. Timestamp? sentAt,
  5. String? text,
  6. Iterable<String>? recipients,
  7. Message? replyTo,
  8. Iterable<MessageReaction>? reactions,
  9. bool? isDeleted,
  10. File? file,
})

Implementation

factory Message({
  $core.String? id,
  $core.String? conversationId,
  $0.User? author,
  $2.Timestamp? sentAt,
  $core.String? text,
  $core.Iterable<$core.String>? recipients,
  Message? replyTo,
  $core.Iterable<MessageReaction>? reactions,
  $core.bool? isDeleted,
  $3.File? file,
}) {
  final _result = create();
  if (id != null) {
    _result.id = id;
  }
  if (conversationId != null) {
    _result.conversationId = conversationId;
  }
  if (author != null) {
    _result.author = author;
  }
  if (sentAt != null) {
    _result.sentAt = sentAt;
  }
  if (text != null) {
    _result.text = text;
  }
  if (recipients != null) {
    _result.recipients.addAll(recipients);
  }
  if (replyTo != null) {
    _result.replyTo = replyTo;
  }
  if (reactions != null) {
    _result.reactions.addAll(reactions);
  }
  if (isDeleted != null) {
    _result.isDeleted = isDeleted;
  }
  if (file != null) {
    _result.file = file;
  }
  return _result;
}