copyWith method
AgentStep
copyWith({
- String? title,
- AgentStepStatus? status,
- String? detail,
- bool clearDetail = false,
Returns a copy with the given fields replaced.
A null detail keeps the current one; clearDetail removes it and wins
over detail.
Implementation
AgentStep copyWith({
String? title,
AgentStepStatus? status,
String? detail,
bool clearDetail = false,
}) => AgentStep(
id: id,
title: title ?? this.title,
status: status ?? this.status,
detail: clearDetail ? null : detail ?? this.detail,
);