copyWith method
A copy with the given properties replaced; everything else, unknown keys included, is kept.
Implementation
ToolResultContent copyWith({
Map<String, Object?>? meta,
List<ContentBlock>? content,
bool? isError,
Object? structuredContent,
String? toolUseId,
}) =>
ToolResultContent.fromJson({
...toJson(),
if (meta != null) '_meta': $encode(meta),
if (content != null) 'content': $encode(content),
if (isError != null) 'isError': $encode(isError),
if (structuredContent != null) 'structuredContent': $encode(structuredContent),
if (toolUseId != null) 'toolUseId': $encode(toolUseId),
});