From e98b091253a25acb278eae5267466f34514a23f4 Mon Sep 17 00:00:00 2001 From: Faris Armoush Date: Thu, 24 Jul 2025 09:39:38 +0300 Subject: [PATCH] Refactor `SpaceManagementBody` to use a `Stack` layout for improved UI structure, allowing better positioning of the `SpaceManagementCommunitiesTree` and the main content. Enhance `SpaceManagementCommunitiesTree` with a shadow effect for better visual separation. This change promotes a more organized and visually appealing interface. --- .../widgets/space_management_body.dart | 29 +++++++++++-------- .../space_management_communities_tree.dart | 11 ++++++- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/lib/pages/space_management_v2/main_module/widgets/space_management_body.dart b/lib/pages/space_management_v2/main_module/widgets/space_management_body.dart index 5d81bffb..6e43b4e7 100644 --- a/lib/pages/space_management_v2/main_module/widgets/space_management_body.dart +++ b/lib/pages/space_management_v2/main_module/widgets/space_management_body.dart @@ -10,21 +10,26 @@ class SpaceManagementBody extends StatelessWidget { @override Widget build(BuildContext context) { - return Row( + return Stack( children: [ - const SpaceManagementCommunitiesTree(), - Expanded( - child: BlocBuilder( - buildWhen: (previous, current) => - previous.selectedCommunity != current.selectedCommunity, - builder: (context, state) => Visibility( - visible: state.selectedCommunity == null, - replacement: const SpaceManagementCommunityStructure(), - child: const SpaceManagementTemplatesView(), + Row( + children: [ + const SizedBox(width: 320), + Expanded( + child: BlocBuilder( + buildWhen: (previous, current) => + previous.selectedCommunity != current.selectedCommunity, + builder: (context, state) => Visibility( + visible: state.selectedCommunity == null, + replacement: const SpaceManagementCommunityStructure(), + child: const SpaceManagementTemplatesView(), + ), + ), ), - ), + ], ), + const SpaceManagementCommunitiesTree(), ], ); } diff --git a/lib/pages/space_management_v2/modules/communities/presentation/widgets/space_management_communities_tree.dart b/lib/pages/space_management_v2/modules/communities/presentation/widgets/space_management_communities_tree.dart index 1adf9911..d986ef01 100644 --- a/lib/pages/space_management_v2/modules/communities/presentation/widgets/space_management_communities_tree.dart +++ b/lib/pages/space_management_v2/modules/communities/presentation/widgets/space_management_communities_tree.dart @@ -9,6 +9,7 @@ import 'package:syncrow_web/pages/space_management_v2/modules/communities/presen import 'package:syncrow_web/pages/space_management_v2/modules/communities/presentation/widgets/space_management_communities_tree_community_tile.dart'; import 'package:syncrow_web/pages/space_management_v2/modules/communities/presentation/widgets/space_management_sidebar_communities_list.dart'; import 'package:syncrow_web/pages/space_management_v2/modules/communities/presentation/widgets/space_management_sidebar_header.dart'; +import 'package:syncrow_web/utils/color_manager.dart'; import 'package:syncrow_web/utils/style.dart'; class SpaceManagementCommunitiesTree extends StatefulWidget { @@ -44,7 +45,15 @@ class _SpaceManagementCommunitiesTreeState return BlocBuilder( builder: (context, state) => Container( width: 320, - decoration: subSectionContainerDecoration, + decoration: subSectionContainerDecoration.copyWith( + boxShadow: [ + BoxShadow( + color: ColorsManager.shadowBlackColor.withValues(alpha: 0.1), + blurRadius: 10, + offset: const Offset(10, 0), + ), + ], + ), child: Column( children: [ const SpaceManagementSidebarHeader(),