// ignore: depend_on_referenced_packages import 'package:bloc/bloc.dart'; part 'reservation_state.dart'; class ReservationCubit extends Cubit { ReservationCubit() : super(const ReservationState()); void reserveProduct(String productId) { if (state.reservedProductIds.contains(productId)) return; final updatedList = List.from(state.reservedProductIds)..add(productId); emit(state.copyWith(reservedProductIds: updatedList)); } bool isProductReserved(String productId) { return state.reservedProductIds.contains(productId); } }