copyWith method

Implementation copyWith({
  1. String? name,
  2. String? version,
  3. String? title,
  4. String? description,
  5. List<McpIcon>? icons,
  6. String? websiteUrl,
})

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

Implementation

Implementation copyWith({
  String? name,
  String? version,
  String? title,
  String? description,
  List<McpIcon>? icons,
  String? websiteUrl,
}) =>
    Implementation.fromJson({
      ...toJson(),
      if (name != null) 'name': $encode(name),
      if (version != null) 'version': $encode(version),
      if (title != null) 'title': $encode(title),
      if (description != null) 'description': $encode(description),
      if (icons != null) 'icons': $encode(icons),
      if (websiteUrl != null) 'websiteUrl': $encode(websiteUrl),
    });