copyWith method
NodeConfig
copyWith({
- String? name,
- String? id,
- String? uId,
- Set<
NodeCapability> ? capabilities, - Map<
String, dynamic> ? metadata,
override
Creates a copy of the configuration with the given parameters. If a parameter is not provided, the value from the current configuration is used.
Implementation
@override
NodeConfig copyWith({
String? name,
String? id,
String? uId,
Set<NodeCapability>? capabilities,
Map<String, dynamic>? metadata,
}) {
return NodeConfig(
name: name ?? this.name,
id: id ?? this.id,
uId: uId ?? this.uId,
capabilities: capabilities ?? this.capabilities,
metadata: metadata ?? _metadata,
);
}