Filip Hracek
1 min readAug 27, 2018

--

Yes, the canonical way at Google is to plug the streams to the parent Bloc instead of having a direct reference.

In other ways, you subscribe the parent to streams of its children that it’s interested in. If a child is interested in a stream of a sibling, it needs to go to the parent.

I want to underline that it’s easy to go overboard with this pattern. If at any point your Bloc structure seems to be overly complicated (given the app you’re building), simplify. For example, sometimes you don’t need to split a piece of business logic into two separate blocs.

--

--

Filip Hracek
Filip Hracek

Written by Filip Hracek

I’m a pro­gram­ming buff with formal train­ing in jour­nal­ism. I build games, teach pro­gram­ming, explain things, and create silly soft­ware experiments.

Responses (1)