copyWith method
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,
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,
);
}