import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:pharmacy_mobile/blocs/caches/supplierlist/supplierlist_cache_event.dart';
import 'package:pharmacy_mobile/blocs/caches/supplierlist/supplierlist_cache_state.dart';

class SupplierListBloc extends Bloc<SupplierListCacheEvent, SupplierListCacheState> {
  SupplierListBloc() : super(SupplierListCacheState([])) {
    on<SupplierListCacheSet>((event, emit) {
      emit(SupplierListCacheState(event.value));
    });
    on<SupplierListCacheGet>((event, emit) {
      emit(state);
    });
  }
}
