copyWith method
StepState<Input, Output>
copyWith({
- Output? output,
- StepStatus? status,
- DateTime? endTime,
- Object? error,
Creates a copy of this state with updated fields
Implementation
StepState<Input, Output> copyWith({
Output? output,
StepStatus? status,
DateTime? endTime,
Object? error,
}) {
return StepState(
step: step,
input: input,
output: output ?? this.output,
status: status ?? this.status,
startTime: startTime,
endTime: endTime ?? this.endTime,
error: error ?? this.error,
);
}