copyWith method

ToolResultPart copyWith({
  1. String? toolCallId,
  2. Object? result,
  3. bool? isError,
})

Returns a copy with the given fields replaced.

Implementation

ToolResultPart copyWith({
  String? toolCallId,
  Object? result,
  bool? isError,
}) =>
    ToolResultPart(
      toolCallId: toolCallId ?? this.toolCallId,
      result: result ?? this.result,
      isError: isError ?? this.isError,
    );