Display selected community name

This commit is contained in:
hannathkadher
2024-10-09 10:52:11 +04:00
parent ec4bb9bc04
commit 7122ad5ac1

View File

@ -82,9 +82,7 @@ class SpaceManagementPageState extends State<SpaceManagementPage> {
children: [ children: [
SidebarWidget( SidebarWidget(
communities: communities, communities: communities,
onCommunitySelected: (community) { onCommunitySelected: (community) {},
},
), ),
showCommunityStructure showCommunityStructure
? _buildCommunityStructureArea(context, screenSize) ? _buildCommunityStructureArea(context, screenSize)
@ -133,13 +131,27 @@ class SpaceManagementPageState extends State<SpaceManagementPage> {
), ),
], ],
), ),
child: Text( child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Community Structure', 'Community Structure',
style: TextStyle( style: TextStyle(
fontSize: 24, fontSize: 24,
fontWeight: FontWeight.bold, 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 // Use Expanded to ensure InteractiveViewer takes the available space
Flexible( Flexible(