mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-11-27 08:14:56 +00:00
added on select for community
This commit is contained in:
@ -30,6 +30,9 @@ class SpaceManagementPageState extends State<SpaceManagementPage> {
|
||||
// Track whether to show the community list view or community structure
|
||||
bool showCommunityStructure = false;
|
||||
|
||||
// Selected community
|
||||
CommunityModel? selectedCommunity;
|
||||
|
||||
// API instance
|
||||
final CommunitySpaceManagementApi _api = CommunitySpaceManagementApi();
|
||||
|
||||
@ -80,20 +83,23 @@ class SpaceManagementPageState extends State<SpaceManagementPage> {
|
||||
SidebarWidget(
|
||||
communities: communities,
|
||||
onCommunitySelected: (community) {
|
||||
context.read<SpaceManagementBloc>().add(
|
||||
LoadCommunityAndSpacesEvent(), // Re-fetch or perform community-specific actions
|
||||
);
|
||||
|
||||
},
|
||||
),
|
||||
const SizedBox(width: 45),
|
||||
showCommunityStructure
|
||||
? _buildCommunityStructureArea(context, screenSize)
|
||||
: CommunityListViewWidget(
|
||||
communities: communities,
|
||||
onCommunitySelected: (community) {
|
||||
setState(() {
|
||||
selectedCommunity = community;
|
||||
showCommunityStructure = true;
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
const GradientBorderWidget()
|
||||
const GradientCanvasBorderWidget()
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user