copyWith method
A copy with the given properties replaced; everything else, unknown keys included, is kept.
Implementation
Prompt copyWith({
List<PromptArgument>? arguments,
String? description,
String? name,
Map<String, Object?>? meta,
String? title,
List<McpIcon>? icons,
}) =>
Prompt.fromJson({
...toJson(),
if (arguments != null) 'arguments': $encode(arguments),
if (description != null) 'description': $encode(description),
if (name != null) 'name': $encode(name),
if (meta != null) '_meta': $encode(meta),
if (title != null) 'title': $encode(title),
if (icons != null) 'icons': $encode(icons),
});