mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-11-27 02:14:55 +00:00
Added side tree to space model
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.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/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/product_model.dart';
|
||||||
import 'package:syncrow_web/pages/spaces_management/all_spaces/model/space_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(
|
return Stack(
|
||||||
clipBehavior: Clip.none,
|
clipBehavior: Clip.none,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
widget.shouldNavigateToSpaceModelPage
|
||||||
children: [
|
? Row(
|
||||||
SidebarWidget(
|
children: [
|
||||||
communities: widget.communities,
|
SizedBox(width: 300, child: SpaceTreeView(onSelect: () {})),
|
||||||
selectedSpaceUuid: widget.selectedSpace?.uuid ??
|
Expanded(
|
||||||
widget.selectedCommunity?.uuid ??
|
|
||||||
'',
|
|
||||||
),
|
|
||||||
widget.shouldNavigateToSpaceModelPage
|
|
||||||
? Expanded(
|
|
||||||
child: BlocProvider(
|
child: BlocProvider(
|
||||||
create: (context) => SpaceModelBloc(
|
create: (context) => SpaceModelBloc(
|
||||||
api: SpaceModelManagementApi(),
|
api: SpaceModelManagementApi(),
|
||||||
@ -95,8 +90,17 @@ class _LoadedSpaceViewState extends State<LoadedSpaceView> {
|
|||||||
onSpaceModelsUpdated: _onSpaceModelsUpdated,
|
onSpaceModelsUpdated: _onSpaceModelsUpdated,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
: CommunityStructureArea(
|
],
|
||||||
|
)
|
||||||
|
: Row(
|
||||||
|
children: [
|
||||||
|
SidebarWidget(
|
||||||
|
communities: widget.communities,
|
||||||
|
selectedSpaceUuid:
|
||||||
|
widget.selectedSpace?.uuid ?? widget.selectedCommunity?.uuid ?? '',
|
||||||
|
),
|
||||||
|
CommunityStructureArea(
|
||||||
selectedCommunity: widget.selectedCommunity,
|
selectedCommunity: widget.selectedCommunity,
|
||||||
selectedSpace: widget.selectedSpace,
|
selectedSpace: widget.selectedSpace,
|
||||||
spaces: widget.selectedCommunity?.spaces ?? [],
|
spaces: widget.selectedCommunity?.spaces ?? [],
|
||||||
@ -104,8 +108,8 @@ class _LoadedSpaceViewState extends State<LoadedSpaceView> {
|
|||||||
communities: widget.communities,
|
communities: widget.communities,
|
||||||
spaceModels: _spaceModels,
|
spaceModels: _spaceModels,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const GradientCanvasBorderWidget(),
|
const GradientCanvasBorderWidget(),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user