fixed block flow

This commit is contained in:
hannathkadher
2025-01-02 17:55:04 +04:00
parent 65ad9c5edf
commit 80dea5c12d

View File

@ -239,11 +239,15 @@ class SpaceManagementBloc
SelectCommunityEvent event,
Emitter<SpaceManagementState> emit,
) async {
_handleCommunitySpaceStateUpdate(
emit: emit,
selectedCommunity: event.selectedCommunity,
selectedSpace: null,
);
try {
_handleCommunitySpaceStateUpdate(
emit: emit,
selectedCommunity: event.selectedCommunity,
selectedSpace: null,
);
} catch (e) {
emit(SpaceManagementError('Error updating state: $e'));
}
}
void _onSelectSpace(
@ -267,7 +271,8 @@ class SpaceManagementBloc
try {
if (previousState is SpaceManagementLoaded ||
previousState is BlankState) {
previousState is BlankState ||
previousState is SpaceModelLoaded) {
final communities = List<CommunityModel>.from(
(previousState as dynamic).communities,
);