copyWith method

ToolExecution copyWith({
  1. ToolExecutionTaskSupport? taskSupport,
})

A copy with the given properties replaced; everything else, unknown keys included, is kept.

Implementation

ToolExecution copyWith({
  ToolExecutionTaskSupport? taskSupport,
}) =>
    ToolExecution.fromJson({
      ...toJson(),
      if (taskSupport != null) 'taskSupport': $encode(taskSupport),
    });