mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
removed center
This commit is contained in:
@ -174,58 +174,54 @@ class SpaceManagementPageState extends State<SpaceManagementPage> {
|
||||
size: Size(2000, 2000), // Explicit canvas size
|
||||
painter: CurvedLinePainter(connections),
|
||||
),
|
||||
Center(
|
||||
child: spaces.isEmpty
|
||||
? AddSpaceButton(
|
||||
onTap: () {
|
||||
_showCreateSpaceDialog(screenSize);
|
||||
},
|
||||
)
|
||||
: Stack(
|
||||
children: spaces
|
||||
.asMap()
|
||||
.entries
|
||||
.map((entry) => SpaceCardWidget(
|
||||
index: entry.key,
|
||||
screenSize: screenSize,
|
||||
position: spaces[entry.key].position,
|
||||
isHovered:
|
||||
spaces[entry.key].isHovered,
|
||||
onPanUpdate:
|
||||
(int index, Offset delta) {
|
||||
setState(() {
|
||||
spaces[index].position += delta;
|
||||
});
|
||||
},
|
||||
onHoverChanged:
|
||||
(int index, bool isHovered) {
|
||||
setState(() {
|
||||
spaces[index].isHovered =
|
||||
isHovered;
|
||||
});
|
||||
},
|
||||
onButtonTap: (int index,
|
||||
Offset newPosition,
|
||||
String direction) {
|
||||
_showCreateSpaceDialog(
|
||||
screenSize,
|
||||
position: spaces[index].position +
|
||||
newPosition,
|
||||
parentIndex: index,
|
||||
direction: direction,
|
||||
);
|
||||
},
|
||||
buildSpaceContainer: (int index) {
|
||||
return SpaceContainerWidget(
|
||||
index: index,
|
||||
icon: spaces[index].icon,
|
||||
name: spaces[index].name,
|
||||
);
|
||||
},
|
||||
))
|
||||
.toList(),
|
||||
),
|
||||
),
|
||||
|
||||
spaces.isEmpty
|
||||
? AddSpaceButton(
|
||||
onTap: () {
|
||||
_showCreateSpaceDialog(screenSize);
|
||||
},
|
||||
)
|
||||
: Stack(
|
||||
children: spaces
|
||||
.asMap()
|
||||
.entries
|
||||
.map((entry) => SpaceCardWidget(
|
||||
index: entry.key,
|
||||
screenSize: screenSize,
|
||||
position: spaces[entry.key].position,
|
||||
isHovered: spaces[entry.key].isHovered,
|
||||
onPanUpdate: (int index, Offset delta) {
|
||||
setState(() {
|
||||
spaces[index].position += delta;
|
||||
});
|
||||
},
|
||||
onHoverChanged:
|
||||
(int index, bool isHovered) {
|
||||
setState(() {
|
||||
spaces[index].isHovered = isHovered;
|
||||
});
|
||||
},
|
||||
onButtonTap: (int index,
|
||||
Offset newPosition,
|
||||
String direction) {
|
||||
_showCreateSpaceDialog(
|
||||
screenSize,
|
||||
position: spaces[index].position +
|
||||
newPosition,
|
||||
parentIndex: index,
|
||||
direction: direction,
|
||||
);
|
||||
},
|
||||
buildSpaceContainer: (int index) {
|
||||
return SpaceContainerWidget(
|
||||
index: index,
|
||||
icon: spaces[index].icon,
|
||||
name: spaces[index].name,
|
||||
);
|
||||
},
|
||||
))
|
||||
.toList(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
Reference in New Issue
Block a user