mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-14 09:17:37 +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
|
size: Size(2000, 2000), // Explicit canvas size
|
||||||
painter: CurvedLinePainter(connections),
|
painter: CurvedLinePainter(connections),
|
||||||
),
|
),
|
||||||
Center(
|
|
||||||
child: spaces.isEmpty
|
spaces.isEmpty
|
||||||
? AddSpaceButton(
|
? AddSpaceButton(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
_showCreateSpaceDialog(screenSize);
|
_showCreateSpaceDialog(screenSize);
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
: Stack(
|
: Stack(
|
||||||
children: spaces
|
children: spaces
|
||||||
.asMap()
|
.asMap()
|
||||||
.entries
|
.entries
|
||||||
.map((entry) => SpaceCardWidget(
|
.map((entry) => SpaceCardWidget(
|
||||||
index: entry.key,
|
index: entry.key,
|
||||||
screenSize: screenSize,
|
screenSize: screenSize,
|
||||||
position: spaces[entry.key].position,
|
position: spaces[entry.key].position,
|
||||||
isHovered:
|
isHovered: spaces[entry.key].isHovered,
|
||||||
spaces[entry.key].isHovered,
|
onPanUpdate: (int index, Offset delta) {
|
||||||
onPanUpdate:
|
setState(() {
|
||||||
(int index, Offset delta) {
|
spaces[index].position += delta;
|
||||||
setState(() {
|
});
|
||||||
spaces[index].position += delta;
|
},
|
||||||
});
|
onHoverChanged:
|
||||||
},
|
(int index, bool isHovered) {
|
||||||
onHoverChanged:
|
setState(() {
|
||||||
(int index, bool isHovered) {
|
spaces[index].isHovered = isHovered;
|
||||||
setState(() {
|
});
|
||||||
spaces[index].isHovered =
|
},
|
||||||
isHovered;
|
onButtonTap: (int index,
|
||||||
});
|
Offset newPosition,
|
||||||
},
|
String direction) {
|
||||||
onButtonTap: (int index,
|
_showCreateSpaceDialog(
|
||||||
Offset newPosition,
|
screenSize,
|
||||||
String direction) {
|
position: spaces[index].position +
|
||||||
_showCreateSpaceDialog(
|
newPosition,
|
||||||
screenSize,
|
parentIndex: index,
|
||||||
position: spaces[index].position +
|
direction: direction,
|
||||||
newPosition,
|
);
|
||||||
parentIndex: index,
|
},
|
||||||
direction: direction,
|
buildSpaceContainer: (int index) {
|
||||||
);
|
return SpaceContainerWidget(
|
||||||
},
|
index: index,
|
||||||
buildSpaceContainer: (int index) {
|
icon: spaces[index].icon,
|
||||||
return SpaceContainerWidget(
|
name: spaces[index].name,
|
||||||
index: index,
|
);
|
||||||
icon: spaces[index].icon,
|
},
|
||||||
name: spaces[index].name,
|
))
|
||||||
);
|
.toList(),
|
||||||
},
|
),
|
||||||
))
|
|
||||||
.toList(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Reference in New Issue
Block a user