mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-17 02:25:31 +00:00
updated api
This commit is contained in:
@ -38,14 +38,13 @@ class SpaceManagementPageState extends State<SpaceManagementPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BlocProvider(
|
||||
create: (context) => SpaceManagementBloc(CommunitySpaceManagementApi())
|
||||
..add(LoadCommunityAndSpacesEvent()),
|
||||
create: (context) =>
|
||||
SpaceManagementBloc(CommunitySpaceManagementApi())..add(LoadCommunityAndSpacesEvent()),
|
||||
child: WebScaffold(
|
||||
appBarTitle: Text('Space Management',
|
||||
style: Theme.of(context).textTheme.headlineLarge),
|
||||
appBarTitle: Text('Space Management', style: Theme.of(context).textTheme.headlineLarge),
|
||||
enableMenuSidebar: false,
|
||||
scaffoldBody: BlocBuilder<SpaceManagementBloc, SpaceManagementState>(
|
||||
builder: (context, state) {
|
||||
scaffoldBody:
|
||||
BlocBuilder<SpaceManagementBloc, SpaceManagementState>(builder: (context, state) {
|
||||
if (state is SpaceManagementLoading) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
} else if (state is SpaceManagementLoaded) {
|
||||
@ -66,27 +65,4 @@ class SpaceManagementPageState extends State<SpaceManagementPage> {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildLoadedState(
|
||||
BuildContext context, List<CommunityModel> communities) {
|
||||
return Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
SidebarWidget(
|
||||
communities: communities,
|
||||
onCommunitySelected: (community) {
|
||||
setState(() {
|
||||
selectedCommunity = community;
|
||||
});
|
||||
},
|
||||
),
|
||||
CommunityStructureArea(selectedCommunity: selectedCommunity),
|
||||
],
|
||||
),
|
||||
const GradientCanvasBorderWidget()
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user