copyWith method
A copy with the given properties replaced; everything else, unknown keys included, is kept.
Implementation
McpIcon copyWith({
String? mimeType,
List<String>? sizes,
String? src,
McpIconTheme? theme,
}) =>
McpIcon.fromJson({
...toJson(),
if (mimeType != null) 'mimeType': $encode(mimeType),
if (sizes != null) 'sizes': $encode(sizes),
if (src != null) 'src': $encode(src),
if (theme != null) 'theme': $encode(theme),
});