Bits of Flutter
Architecture · · 3 min read

BLoC Powered Components

Don’t make one single bloc for the home page, it will bloat the app state if it needs a lot of information. Follow the Single Responsibility Principle and split the UI components into small presentation layer features with their own BLoCs.

Related Posts

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