no need for selectedbookableSpaces list anymore instead i am using state list

This commit is contained in:
Rafeek-Khoudare
2025-07-22 16:47:50 +03:00
parent b6d4084ca7
commit 6a7174b929
12 changed files with 331 additions and 282 deletions

View File

@ -63,9 +63,10 @@ class _SetupBookableSpacesDialogState extends State<SetupBookableSpacesDialog> {
RemoteNonBookableSpaces(HTTPService()))
: (context) => SetupBookableSpacesBloc(
RemoteNonBookableSpaces(HTTPService()))
..add(EditModeSelected(
editingBookableSpace: widget.editingBookableSpace!,
)),
..add(
EditModeSelected(
editingBookableSpace: widget.editingBookableSpace!),
),
),
BlocProvider(
create: (context) => SendBookableSpacesBloc(
@ -115,16 +116,14 @@ class _SetupBookableSpacesDialogState extends State<SetupBookableSpacesDialog> {
),
Builder(builder: (context) {
final stepsState = context.watch<StepsCubit>().state;
final setupBookableSpacesBloc =
context.watch<SetupBookableSpacesBloc>();
final selectedSpaces =
setupBookableSpacesBloc.selectedBookableSpaces;
final bookableSpaces =
context.watch<SetupBookableSpacesBloc>().state.bookableSpaces;
return stepsState is StepOneState
? NextFirstStepButton(selectedSpaces: selectedSpaces)
? const NextFirstStepButton()
: SaveSecondStepButton(
selectedSpaces: selectedSpaces,
pointsController: pointsController,
isEditingMode: widget.editingBookableSpace != null,
bookableSpaces: bookableSpaces,
);
}),
],