Implemented space management canvas.

This commit is contained in:
Faris Armoush
2025-06-23 15:45:49 +03:00
parent ada7daf179
commit 8bc7a3daa2
13 changed files with 571 additions and 7 deletions
@@ -32,7 +32,7 @@ class CommunitiesTreeSelectionBloc
) {
emit(
CommunitiesTreeSelectionState(
selectedCommunity: null,
selectedCommunity: event.community,
selectedSpace: event.space,
),
);
@@ -8,7 +8,7 @@ sealed class CommunitiesTreeSelectionEvent extends Equatable {
}
final class SelectCommunityEvent extends CommunitiesTreeSelectionEvent {
final CommunityModel? community;
final CommunityModel community;
const SelectCommunityEvent({required this.community});
@override
@@ -16,9 +16,10 @@ final class SelectCommunityEvent extends CommunitiesTreeSelectionEvent {
}
final class SelectSpaceEvent extends CommunitiesTreeSelectionEvent {
final SpaceModel? space;
final SpaceModel space;
final CommunityModel community;
const SelectSpaceEvent({required this.space});
const SelectSpaceEvent({required this.space, required this.community});
@override
List<Object?> get props => [space];
@@ -30,7 +30,7 @@ class SpaceManagementCommunitiesTreeSpaceTile extends StatelessWidget {
initiallyExpanded: spaceIsExpanded,
onExpansionChanged: (expanded) {},
onItemSelected: () => context.read<CommunitiesTreeSelectionBloc>().add(
SelectSpaceEvent(space: space),
SelectSpaceEvent(community: community, space: space),
),
children: space.children
.map(