Added side tree to space model

This commit is contained in:
Abdullah Alassaf
2025-02-18 12:31:43 +03:00
parent b968b5a6eb
commit 0c2a092f4d

View File

@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:syncrow_web/pages/common/bloc/project_manager.dart';
import 'package:syncrow_web/pages/space_tree/view/space_tree_view.dart';
import 'package:syncrow_web/pages/spaces_management/all_spaces/model/community_model.dart';
import 'package:syncrow_web/pages/spaces_management/all_spaces/model/product_model.dart';
import 'package:syncrow_web/pages/spaces_management/all_spaces/model/space_model.dart';
@ -75,16 +75,11 @@ class _LoadedSpaceViewState extends State<LoadedSpaceView> {
return Stack(
clipBehavior: Clip.none,
children: [
Row(
children: [
SidebarWidget(
communities: widget.communities,
selectedSpaceUuid: widget.selectedSpace?.uuid ??
widget.selectedCommunity?.uuid ??
'',
),
widget.shouldNavigateToSpaceModelPage
? Expanded(
widget.shouldNavigateToSpaceModelPage
? Row(
children: [
SizedBox(width: 300, child: SpaceTreeView(onSelect: () {})),
Expanded(
child: BlocProvider(
create: (context) => SpaceModelBloc(
api: SpaceModelManagementApi(),
@ -95,8 +90,17 @@ class _LoadedSpaceViewState extends State<LoadedSpaceView> {
onSpaceModelsUpdated: _onSpaceModelsUpdated,
),
),
)
: CommunityStructureArea(
),
],
)
: Row(
children: [
SidebarWidget(
communities: widget.communities,
selectedSpaceUuid:
widget.selectedSpace?.uuid ?? widget.selectedCommunity?.uuid ?? '',
),
CommunityStructureArea(
selectedCommunity: widget.selectedCommunity,
selectedSpace: widget.selectedSpace,
spaces: widget.selectedCommunity?.spaces ?? [],
@ -104,8 +108,8 @@ class _LoadedSpaceViewState extends State<LoadedSpaceView> {
communities: widget.communities,
spaceModels: _spaceModels,
),
],
),
],
),
const GradientCanvasBorderWidget(),
],
);