import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:pharmacy_mobile/blocs/caches/distributorlist/distributorlist_cache_event.dart';
import 'package:pharmacy_mobile/blocs/caches/distributorlist/distributorlist_cache_state.dart';

class DistributorListBloc extends Bloc<DistributorListCacheEvent, DistributorListCacheState> {
  DistributorListBloc() : super(DistributorListCacheState([])) {
    on<DistributorListCacheSet>((event, emit) {
      emit(DistributorListCacheState(event.value));
    });
    on<DistributorListCacheGet>((event, emit) {
      emit(state);
    });
  }
}
