Reputation: 2900
I am new to clean architecture in flutter,
I know that we should inject our repositories via usecases into presenters like BLoc but I don't know how to use services like an audio service, for example we should pause, resume, seek and ... from the audioServiceImpl,
does it need a usecase for each opearation like play or we should inject the service directly into BLoc ?
Upvotes: 2
Views: 700
Reputation: 1482
You've not mentioned to the layers you've adopted from the clean architecture and the use case you need to consider such a design, so it makes your question opinion based.
A service like audio player is more a UI related thing and it does not contain business logic, as it mentioned in the clean architecture use cases layer contains application specific business rules. You should clarify how your playing file involves business logic. Although you still can use bloc for player state management.
Upvotes: 2