I'm building the chat part of my app using firbase, and I am thinking about its architecture.
I'm thinking about either :
- using the BLoC pattern and so, subscribe to the stream of messages (or the list of conversations for the second screen) inside the bloc, and emmiting a new state with the list of messages (or conversations) everytime a message comes from the stream. That way, the
BlocBuilderof the UI will rebuild the UI everytime a new message in sent. - Directly plug the stream to a
StreamBuilderin the UI, and therefore not using the BLoC pattern
What would be the difference between these approaches ?
