copyWith method

  1. @override
NodeConfig copyWith({
  1. String? name,
  2. String? id,
  3. String? uId,
  4. Set<NodeCapability>? capabilities,
  5. 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,
  );
}