CollectionBloc constructor
CollectionBloc({
- required ModelListBloc modelCollectionBloc,
- required ICollectionProvider pageListProvider,
- required LocalPageBloc filterStructureBloc,
- 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);
}