import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:pharmacy_mobile/blocs/caches/stocklist/stocklist_cache_event.dart';
import 'package:pharmacy_mobile/blocs/caches/stocklist/stocklist_cache_state.dart';

class StockListBloc extends Bloc<StockListCacheEvent, StockListCacheState> {
  StockListBloc() : super(StockListCacheState([])) {
    on<StockListCacheSet>((event, emit) {
      emit(StockListCacheState(event.value));
    });
    on<StockListCacheGet>((event, emit) {
      emit(state);
    });
  }
}
