fix the circular progress on empty space model

This commit is contained in:
hannathkadher
2025-03-09 15:53:55 +04:00
parent 16c006e7a9
commit a1d15c9cea

View File

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