copyWith method

NodeDescriptor copyWith({
  1. bool? online,
  2. NodeCapabilities? capabilities,
  3. Map<String, String>? labels,
})

Returns a copy with selected fields replaced.

Implementation

NodeDescriptor copyWith({
  bool? online,
  NodeCapabilities? capabilities,
  Map<String, String>? labels,
}) => NodeDescriptor(
  id: id,
  uid: uid,
  displayName: displayName,
  platform: platform,
  online: online ?? this.online,
  labels: labels ?? this.labels,
  capabilities: capabilities ?? this.capabilities,
);