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
Widget build(BuildContext context) {
return Row(
return Stack(
children: [
const SpaceManagementCommunitiesTree(),
Expanded(
child: BlocBuilder<CommunitiesTreeSelectionBloc,
CommunitiesTreeSelectionState>(
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<CommunitiesTreeSelectionBloc,
CommunitiesTreeSelectionState>(
buildWhen: (previous, current) =>
previous.selectedCommunity != current.selectedCommunity,
builder: (context, state) => Visibility(
visible: state.selectedCommunity == null,
replacement: const SpaceManagementCommunityStructure(),
child: const SpaceManagementTemplatesView(),
),
),
),
),
],
),
const SpaceManagementCommunitiesTree(),
],
);
}