copyWith method
A copy with the given properties replaced; everything else, unknown keys included, is kept.
Implementation
PromptReference copyWith({
String? name,
String? title,
}) =>
PromptReference.fromJson({
...toJson(),
if (name != null) 'name': $encode(name),
if (title != null) 'title': $encode(title),
});