mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-15 09:45:25 +00:00
delete Space
This commit is contained in:
@ -58,6 +58,14 @@ class SpaceModel {
|
||||
? Offset(json['x'], json['y'])
|
||||
: const Offset(0, 0),
|
||||
isHovered: false,
|
||||
selectedProducts: json['spaceProducts'] != null
|
||||
? (json['spaceProducts'] as List).map((product) {
|
||||
return SelectedProduct(
|
||||
productId: product['product']['uuid'],
|
||||
count: product['productCount'],
|
||||
);
|
||||
}).toList()
|
||||
: [],
|
||||
);
|
||||
|
||||
// Add incomingConnection to the instance after creation
|
||||
@ -97,4 +105,18 @@ class SpaceModel {
|
||||
void addOutgoingConnection(Connection connection) {
|
||||
outgoingConnections.add(connection);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return '''
|
||||
SpaceModel(
|
||||
uuid: $uuid,
|
||||
name: $name,
|
||||
icon: $icon,
|
||||
isPrivate: $isPrivate,
|
||||
position: $position,
|
||||
selectedProducts: $selectedProducts
|
||||
)
|
||||
''';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user