CartComponentBloc constructor

CartComponentBloc({
  1. CartRepository? cartRepository,
})

Implementation

CartComponentBloc({this.cartRepository})
    : super(CartComponentUninitialized()) {
  on<FetchCartComponent>((event, emit) {
    _mapLoadCartComponentUpdateToState(event.id!);
  });
  on<CartComponentUpdated>((event, emit) {
    emit(CartComponentLoaded(value: event.value));
  });
}