CollectionBloc constructor

CollectionBloc({
  1. required ModelListBloc modelCollectionBloc,
  2. required ICollectionProvider pageListProvider,
  3. required LocalPageBloc filterStructureBloc,
  4. required EventBus eventBus,
})

Implementation

CollectionBloc({
  required this.modelCollectionBloc,
  required this.pageListProvider,
  required this.filterStructureBloc,
  required this.eventBus,
}) : super(CollectionState.empty()) {
  eventBus.onEvent(consumer: 'CollectionBloc', eventId: DocumentEvent.documentChanged, handler: _reloadCollection);
  eventBus.onEvent(consumer: 'CollectionBloc', eventId: ModelEvent.saved, handler: _clearCache);
  globalSearchController.addListener(_filterTableByGlobalSearch);
}