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.

This commit is contained in:
Faris Armoush
2025-07-24 09:39:38 +03:00
parent 77d6d822cb
commit e98b091253
2 changed files with 27 additions and 13 deletions

View File

@ -10,21 +10,26 @@ class SpaceManagementBody extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Row( return Stack(
children: [ children: [
const SpaceManagementCommunitiesTree(), Row(
Expanded( children: [
child: BlocBuilder<CommunitiesTreeSelectionBloc, const SizedBox(width: 320),
CommunitiesTreeSelectionState>( Expanded(
buildWhen: (previous, current) => child: BlocBuilder<CommunitiesTreeSelectionBloc,
previous.selectedCommunity != current.selectedCommunity, CommunitiesTreeSelectionState>(
builder: (context, state) => Visibility( buildWhen: (previous, current) =>
visible: state.selectedCommunity == null, previous.selectedCommunity != current.selectedCommunity,
replacement: const SpaceManagementCommunityStructure(), builder: (context, state) => Visibility(
child: const SpaceManagementTemplatesView(), visible: state.selectedCommunity == null,
replacement: const SpaceManagementCommunityStructure(),
child: const SpaceManagementTemplatesView(),
),
),
), ),
), ],
), ),
const SpaceManagementCommunitiesTree(),
], ],
); );
} }

View File

@ -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_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_communities_list.dart';
import 'package:syncrow_web/pages/space_management_v2/modules/communities/presentation/widgets/space_management_sidebar_header.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'; import 'package:syncrow_web/utils/style.dart';
class SpaceManagementCommunitiesTree extends StatefulWidget { class SpaceManagementCommunitiesTree extends StatefulWidget {
@ -44,7 +45,15 @@ class _SpaceManagementCommunitiesTreeState
return BlocBuilder<CommunitiesBloc, CommunitiesState>( return BlocBuilder<CommunitiesBloc, CommunitiesState>(
builder: (context, state) => Container( builder: (context, state) => Container(
width: 320, 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( child: Column(
children: [ children: [
const SpaceManagementSidebarHeader(), const SpaceManagementSidebarHeader(),