copyWith method

EvolutionProposal copyWith({
  1. String? id,
  2. String? ethosId,
  3. EvolutionType? type,
  4. String? targetComponentId,
  5. String? targetComponentType,
  6. String? description,
  7. String? rationale,
  8. List<String>? supportingFeedbackIds,
  9. double? confidence,
  10. ProposedChange? proposedChange,
  11. ProposalStatus? status,
  12. DateTime? proposedAt,
})

Create a copy with modified fields.

Implementation

EvolutionProposal copyWith({
  String? id,
  String? ethosId,
  EvolutionType? type,
  String? targetComponentId,
  String? targetComponentType,
  String? description,
  String? rationale,
  List<String>? supportingFeedbackIds,
  double? confidence,
  ProposedChange? proposedChange,
  ProposalStatus? status,
  DateTime? proposedAt,
}) {
  return EvolutionProposal(
    id: id ?? this.id,
    ethosId: ethosId ?? this.ethosId,
    type: type ?? this.type,
    targetComponentId: targetComponentId ?? this.targetComponentId,
    targetComponentType: targetComponentType ?? this.targetComponentType,
    description: description ?? this.description,
    rationale: rationale ?? this.rationale,
    supportingFeedbackIds:
        supportingFeedbackIds ?? this.supportingFeedbackIds,
    confidence: confidence ?? this.confidence,
    proposedChange: proposedChange ?? this.proposedChange,
    status: status ?? this.status,
    proposedAt: proposedAt ?? this.proposedAt,
  );
}