From 7122ad5ac12cde4a379426c9d7fc26df1c434511 Mon Sep 17 00:00:00 2001 From: hannathkadher Date: Wed, 9 Oct 2024 10:52:11 +0400 Subject: [PATCH] Display selected community name --- .../view/spaces_management_page.dart | 30 +++++++++++++------ 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/lib/pages/spaces_management/view/spaces_management_page.dart b/lib/pages/spaces_management/view/spaces_management_page.dart index e774455c..0a771cfe 100644 --- a/lib/pages/spaces_management/view/spaces_management_page.dart +++ b/lib/pages/spaces_management/view/spaces_management_page.dart @@ -82,9 +82,7 @@ class SpaceManagementPageState extends State { children: [ SidebarWidget( communities: communities, - onCommunitySelected: (community) { - - }, + onCommunitySelected: (community) {}, ), showCommunityStructure ? _buildCommunityStructureArea(context, screenSize) @@ -133,12 +131,26 @@ class SpaceManagementPageState extends State { ), ], ), - child: Text( - 'Community Structure', - style: TextStyle( - fontSize: 24, - fontWeight: FontWeight.bold, - ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Community Structure', + style: TextStyle( + fontSize: 24, + fontWeight: FontWeight.bold, + ), + ), + if (selectedCommunity != null) ...[ + Text( + selectedCommunity!.name, // Show community name + style: TextStyle( + fontSize: 16, + color: ColorsManager.blackColor, // Slightly muted color + ), + ), + ] + ], ), ), // Use Expanded to ensure InteractiveViewer takes the available space