import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:pharmacy_mobile/blocs/caches/genericlist/genericlist_cache_event.dart';
import 'package:pharmacy_mobile/blocs/caches/genericlist/genericlist_cache_state.dart';

class GenericListBloc extends Bloc<GenericListCacheEvent, GenericListCacheState> {
  GenericListBloc() : super(GenericListCacheState([])) {
    on<GenericListCacheSet>((event, emit) {
      emit(GenericListCacheState(event.value));
    });
    on<GenericListCacheGet>((event, emit) {
      emit(state);
    });
  }
}
