Bloc
Event-driven state management pattern for Flutter — part of the architecture of my white-label apps.
Bloc (Business Logic Component) is a Flutter state management library that separates UI from logic through streams of events and states, which keeps behaviour predictable and testable.
How I use it
I use Bloc alongside Riverpod in the shared codebases of my White-label Flutter Apps from my Independent AI & Full-Stack Engineer (Freelance) work, where one codebase ships many branded apps through multi-flavor builds with RevenueCat subscriptions and Firebase or Supabase backends.
Why it matters
Explicit events and states make app behaviour easy to test and reason about, which matters when one shared codebase is shipped as many apps: a bug fixed once is fixed for every brand.
Bloc's clear separation of UI and business logic also makes it easier for several developers — or AI coding agents — to change features without stepping on each other.
Related
- Ale Zanello · Flutter · Riverpod · Dart