mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
Connected templates view into SpaceManagementBody
, while applying the correct UI principals if what to show what when?
This commit is contained in:
@ -1,4 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:syncrow_web/pages/space_management_v2/main_module/widgets/space_management_templates_view.dart';
|
||||||
|
import 'package:syncrow_web/pages/space_management_v2/modules/communities/presentation/communities_tree_selection_bloc/communities_tree_selection_bloc.dart';
|
||||||
import 'package:syncrow_web/pages/space_management_v2/modules/communities/presentation/widgets/space_management_communities_tree.dart';
|
import 'package:syncrow_web/pages/space_management_v2/modules/communities/presentation/widgets/space_management_communities_tree.dart';
|
||||||
|
|
||||||
class SpaceManagementBody extends StatelessWidget {
|
class SpaceManagementBody extends StatelessWidget {
|
||||||
@ -6,9 +9,21 @@ class SpaceManagementBody extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return const Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
SpaceManagementCommunitiesTree(),
|
const SpaceManagementCommunitiesTree(),
|
||||||
|
Expanded(
|
||||||
|
child: BlocBuilder<CommunitiesTreeSelectionBloc,
|
||||||
|
CommunitiesTreeSelectionState>(
|
||||||
|
buildWhen: (previous, current) =>
|
||||||
|
previous.selectedCommunity != current.selectedCommunity,
|
||||||
|
builder: (context, state) => Visibility(
|
||||||
|
visible: state.selectedCommunity == null,
|
||||||
|
replacement: const Placeholder(),
|
||||||
|
child: const SpaceManagementTemplatesView(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user