Single Bloc (actually cubit) with multiple repositories

Viewed 145

I have the following scenario:

  1. multiple firebase collections
  2. multiple FirebaseDataRepositories, all with simple CRUD API
  3. single cubit loading all the collections (not the question, as i might split per repository)

Question:

Is there a way implement this, so that I dont have to have so much repetition? I have a "hunch" that a "FirebaseMultiRepository" could be implemented to achieve this, but I just can't figure out how actually implement it. Maybe some sort of abstract class?

Any ideas are appreciated!

This is the current structure of the implementation: enter image description here

0 Answers
Related