pass selected space

This commit is contained in:
hannathkadher
2024-11-19 18:16:53 +04:00
parent a464788e88
commit 8a2efb2694
4 changed files with 29 additions and 8 deletions

View File

@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:syncrow_web/pages/spaces_management/model/community_model.dart';
import 'package:syncrow_web/pages/spaces_management/model/space_model.dart';
import 'package:syncrow_web/pages/spaces_management/widgets/community_structure_widget.dart';
import 'package:syncrow_web/pages/spaces_management/widgets/gradient_canvas_border_widget.dart';
import 'package:syncrow_web/pages/spaces_management/widgets/sidebar_widget.dart';
@ -7,13 +8,17 @@ import 'package:syncrow_web/pages/spaces_management/widgets/sidebar_widget.dart'
class LoadedSpaceView extends StatefulWidget {
final List<CommunityModel> communities;
final CommunityModel? selectedCommunity;
final SpaceModel? selectedSpace;
final ValueChanged<CommunityModel> onCommunitySelected;
final ValueChanged<SpaceModel> onSpaceSelected;
const LoadedSpaceView({
Key? key,
required this.communities,
this.selectedCommunity,
this.selectedSpace,
required this.onCommunitySelected,
required this.onSpaceSelected,
}) : super(key: key);
@override
@ -31,9 +36,11 @@ class _LoadedStateViewState extends State<LoadedSpaceView> {
SidebarWidget(
communities: widget.communities,
onCommunitySelected: widget.onCommunitySelected,
onSpaceSelected: widget.onSpaceSelected,
),
CommunityStructureArea(
selectedCommunity: widget.selectedCommunity,
selectedSpace: widget.selectedSpace,
spaces: widget.selectedCommunity?.spaces ?? [],
connections: [],
),