Bits of Flutter

#Architecture

5 posts

Layered is not Clean, even with interfaces everywhere

Architecture

Many people think that creating an abstract class, an implementation and injecting the abstraction is already applying the Dependency Inversion Principle. It's not. This post walks through the questions I keep hearing about Clean, layered and DIP, and pins down the one detail that makes the difference.

Read More

BLoC Powered Components

Architecture

Don't make one single BLoC for the whole page. Follow the Single Responsibility Principle and split UI components into small features with their own BLoCs.

Read More

When BLoCs Start Talking Too Much

Architecture

(and how the Mediator Pattern can save you) Sometimes in a Flutter app, one BLoC starts depending on another. Maybe the profile screen needs the current user ID from the AuthBloc. So we inject one BLoC into the other. It works. Until it doesn't.

Read More