diff --git a/lib/pages/spaces_management/view/spaces_management_page.dart b/lib/pages/spaces_management/view/spaces_management_page.dart index 0a771cfe..ad2fcf31 100644 --- a/lib/pages/spaces_management/view/spaces_management_page.dart +++ b/lib/pages/spaces_management/view/spaces_management_page.dart @@ -174,58 +174,54 @@ class SpaceManagementPageState extends State { 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(), + ), ], ), ),