import 'package:flutter/material.dart'; import 'package:syncrow_web/pages/spaces_management/model/community_model.dart'; import 'package:syncrow_web/pages/spaces_management/model/product_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'; class LoadedSpaceView extends StatefulWidget { final List communities; final CommunityModel? selectedCommunity; final SpaceModel? selectedSpace; final ValueChanged? onCommunitySelected; final ValueChanged? onSpaceSelected; final List? products; const LoadedSpaceView({ Key? key, required this.communities, this.selectedCommunity, this.selectedSpace, required this.onCommunitySelected, required this.onSpaceSelected, this.products, }) : super(key: key); @override _LoadedStateViewState createState() => _LoadedStateViewState(); } class _LoadedStateViewState extends State { @override Widget build(BuildContext context) { return Stack( clipBehavior: Clip.none, children: [ Row( children: [ SidebarWidget( communities: widget.communities, onCommunitySelected: widget.onCommunitySelected, onSpaceSelected: widget.onSpaceSelected, ), CommunityStructureArea( selectedCommunity: widget.selectedCommunity, selectedSpace: widget.selectedSpace, spaces: widget.selectedCommunity?.spaces ?? [], connections: [], products: widget.products, ), ], ), const GradientCanvasBorderWidget(), ], ); } }