Conversation constructor

Conversation({
  1. String? id,
  2. String? adminId,
  3. String? image,
  4. Iterable<User>? users,
  5. Timestamp? updatedAt,
  6. Timestamp? createdAt,
  7. Message? lastMessage,
  8. Iterable<MessageRead>? mostRecentlyRead,
})

Implementation

factory Conversation({
  $core.String? id,
  $core.String? adminId,
  $core.String? image,
  $core.Iterable<$0.User>? users,
  $2.Timestamp? updatedAt,
  $2.Timestamp? createdAt,
  Message? lastMessage,
  $core.Iterable<MessageRead>? mostRecentlyRead,
}) {
  final _result = create();
  if (id != null) {
    _result.id = id;
  }
  if (adminId != null) {
    _result.adminId = adminId;
  }
  if (image != null) {
    _result.image = image;
  }
  if (users != null) {
    _result.users.addAll(users);
  }
  if (updatedAt != null) {
    _result.updatedAt = updatedAt;
  }
  if (createdAt != null) {
    _result.createdAt = createdAt;
  }
  if (lastMessage != null) {
    _result.lastMessage = lastMessage;
  }
  if (mostRecentlyRead != null) {
    _result.mostRecentlyRead.addAll(mostRecentlyRead);
  }
  return _result;
}