mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
Add UpdateSpaceDetails Event.
This commit is contained in:
@ -13,6 +13,7 @@ class SpaceDetailsModelBloc extends Bloc<SpaceDetailsModelEvent, SpaceDetailsMod
|
|||||||
on<UpdateSpaceDetailsSubspaces>(_onUpdateSpaceDetailsSubspaces);
|
on<UpdateSpaceDetailsSubspaces>(_onUpdateSpaceDetailsSubspaces);
|
||||||
on<UpdateSpaceDetailsProductAllocations>(
|
on<UpdateSpaceDetailsProductAllocations>(
|
||||||
_onUpdateSpaceDetailsProductAllocations);
|
_onUpdateSpaceDetailsProductAllocations);
|
||||||
|
on<UpdateSpaceDetails>(_onUpdateSpaceDetails);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _onUpdateSpaceDetailsIcon(
|
void _onUpdateSpaceDetailsIcon(
|
||||||
@ -42,4 +43,11 @@ class SpaceDetailsModelBloc extends Bloc<SpaceDetailsModelEvent, SpaceDetailsMod
|
|||||||
) {
|
) {
|
||||||
emit(state.copyWith(productAllocations: event.productAllocations));
|
emit(state.copyWith(productAllocations: event.productAllocations));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _onUpdateSpaceDetails(
|
||||||
|
UpdateSpaceDetails event,
|
||||||
|
Emitter<SpaceDetailsModel> emit,
|
||||||
|
) {
|
||||||
|
emit(event.space);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,3 +42,12 @@ final class UpdateSpaceDetailsProductAllocations extends SpaceDetailsModelEvent
|
|||||||
@override
|
@override
|
||||||
List<Object> get props => [productAllocations];
|
List<Object> get props => [productAllocations];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final class UpdateSpaceDetails extends SpaceDetailsModelEvent {
|
||||||
|
const UpdateSpaceDetails(this.space);
|
||||||
|
|
||||||
|
final SpaceDetailsModel space;
|
||||||
|
|
||||||
|
@override
|
||||||
|
List<Object> get props => [space];
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user