copyWith method
PrefabInstanceSpec
copyWith({
- AssetRef? source,
- LoadPolicy? load,
- List<
PropertyOverride> ? overrides, - List<
Attachment> ? attachments, - List<
LocalId> ? removedNodes, - List<
ComponentSpec> ? addedComponents, - List<
String> ? removedComponentTypes, - List<
MemberComponent> ? memberComponents,
A copy with the given fields replaced. Copy sites must use this (not a field-by-field reconstruction) so a new delta field is never dropped.
Implementation
PrefabInstanceSpec copyWith({
AssetRef? source,
LoadPolicy? load,
List<PropertyOverride>? overrides,
List<Attachment>? attachments,
List<LocalId>? removedNodes,
List<ComponentSpec>? addedComponents,
List<String>? removedComponentTypes,
List<MemberComponent>? memberComponents,
}) => PrefabInstanceSpec(
source: source ?? this.source,
load: load ?? this.load,
overrides: overrides ?? this.overrides,
attachments: attachments ?? this.attachments,
removedNodes: removedNodes ?? this.removedNodes,
addedComponents: addedComponents ?? this.addedComponents,
removedComponentTypes: removedComponentTypes ?? this.removedComponentTypes,
memberComponents: memberComponents ?? this.memberComponents,
);