copyWith method
A copy with the given fields replaced, so rewriters carry every other field (including ones added later) without listing them.
Implementation
MaterialResource copyWith({
String? type,
String? name,
Map<String, PropertyValue>? properties,
AssetRef? asset,
}) => MaterialResource(
id,
type: type ?? this.type,
name: name ?? this.name,
properties: properties ?? this.properties,
asset: asset ?? this.asset,
);