copyWith method
Node
copyWith(
{ - String? nodeId,
- int? role,
- Value<String?> groupId = const Value.absent(),
- int? lastSeen,
- int? hopCount,
- Value<String?> displayName = const Value.absent(),
- Value<int?> batteryLevel = const Value.absent(),
- bool? hasInternetAccess,
- Value<String?> metadata = const Value.absent(),
})
Implementation
Node copyWith({
String? nodeId,
int? role,
Value<String?> groupId = const Value.absent(),
int? lastSeen,
int? hopCount,
Value<String?> displayName = const Value.absent(),
Value<int?> batteryLevel = const Value.absent(),
bool? hasInternetAccess,
Value<String?> metadata = const Value.absent(),
}) => Node(
nodeId: nodeId ?? this.nodeId,
role: role ?? this.role,
groupId: groupId.present ? groupId.value : this.groupId,
lastSeen: lastSeen ?? this.lastSeen,
hopCount: hopCount ?? this.hopCount,
displayName: displayName.present ? displayName.value : this.displayName,
batteryLevel: batteryLevel.present ? batteryLevel.value : this.batteryLevel,
hasInternetAccess: hasInternetAccess ?? this.hasInternetAccess,
metadata: metadata.present ? metadata.value : this.metadata,
);