import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:pharmacy_mobile/blocs/caches/medicinelist/medicinelist_cache_event.dart';
import 'package:pharmacy_mobile/blocs/caches/medicinelist/medicinelist_cache_state.dart';

class MedicineListBloc extends Bloc<MedicineListCacheEvent, MedicineListCacheState> {
  MedicineListBloc() : super(MedicineListCacheState([])) {
    on<MedicineListCacheSet>((event, emit) {
      emit(MedicineListCacheState(event.value));
    });
    on<MedicineListCacheGet>((event, emit) {
      emit(state);
    });
  }
}
