Merge pull request #111 from SyncrowIOT/bugfix/empty-space-model

fix the circular progress on empty space model
This commit is contained in:
hannathkadher
2025-03-09 16:49:36 +04:00
committed by GitHub

View File

@ -81,7 +81,6 @@ class _LoadedSpaceViewState extends State<LoadedSpaceView> {
clipBehavior: Clip.none,
children: [
widget.shouldNavigateToSpaceModelPage
? _spaceModels.isNotEmpty
? Row(
children: [
SizedBox(width: 300, child: SpaceTreeView(onSelect: () {})),
@ -90,7 +89,7 @@ class _LoadedSpaceViewState extends State<LoadedSpaceView> {
create: (context) => SpaceModelBloc(
BlocProvider.of<SpaceTreeBloc>(context),
api: SpaceModelManagementApi(),
initialSpaceModels: _spaceModels,
initialSpaceModels: widget.spaceModels ?? [],
),
child: SpaceModelPage(
products: widget.products,
@ -101,13 +100,13 @@ class _LoadedSpaceViewState extends State<LoadedSpaceView> {
),
],
)
: const Center(child: CircularProgressIndicator())
: Row(
children: [
SidebarWidget(
communities: widget.communities,
selectedSpaceUuid:
widget.selectedSpace?.uuid ?? widget.selectedCommunity?.uuid ?? '',
selectedSpaceUuid: widget.selectedSpace?.uuid ??
widget.selectedCommunity?.uuid ??
'',
),
CommunityStructureArea(
selectedCommunity: widget.selectedCommunity,