copyWith method
Returns a copy with the given fields replaced — so callers augmenting a response don't re-list all five fields by hand.
Implementation
StructuredResponse copyWith({
String? summary,
List<String>? warnings,
List<String>? nextSteps,
Map<String, Object?>? data,
bool? isError,
bool? textOnly,
List<String>? imagePaths,
}) =>
StructuredResponse(
summary: summary ?? this.summary,
warnings: warnings ?? this.warnings,
nextSteps: nextSteps ?? this.nextSteps,
data: data ?? this.data,
isError: isError ?? this.isError,
textOnly: textOnly ?? this.textOnly,
imagePaths: imagePaths ?? this.imagePaths,
);