mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
Refactor SpaceCardWidget: Simplified widget structure by removing unnecessary SizedBox.
This commit is contained in:
@ -22,22 +22,20 @@ class _SpaceCardWidgetState extends State<SpaceCardWidget> {
|
|||||||
return MouseRegion(
|
return MouseRegion(
|
||||||
onEnter: (_) => setState(() => isHovered = true),
|
onEnter: (_) => setState(() => isHovered = true),
|
||||||
onExit: (_) => setState(() => isHovered = false),
|
onExit: (_) => setState(() => isHovered = false),
|
||||||
child: SizedBox(
|
child: Stack(
|
||||||
child: Stack(
|
clipBehavior: Clip.none,
|
||||||
clipBehavior: Clip.none,
|
alignment: Alignment.center,
|
||||||
alignment: Alignment.center,
|
children: [
|
||||||
children: [
|
widget.buildSpaceContainer(),
|
||||||
widget.buildSpaceContainer(),
|
if (isHovered)
|
||||||
if (isHovered)
|
Positioned(
|
||||||
Positioned(
|
bottom: 0,
|
||||||
bottom: 0,
|
child: PlusButtonWidget(
|
||||||
child: PlusButtonWidget(
|
offset: Offset.zero,
|
||||||
offset: Offset.zero,
|
onButtonTap: widget.onTap,
|
||||||
onButtonTap: widget.onTap,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user