Open source · Flutter tooling
Mason Bloc
Mason bricks that generate a Flutter feature with BLoC, with or without clean-architecture layers.
- Mobile
- Tooling
The story
Every new Flutter feature starts the same way: a folder tree, a BLoC with its events and states, a page and a model. Writing that by hand is slow and drifts from feature to feature.
Mason Bloc is a set of Mason bricks that generate it in one command. Give it a feature name and it writes the files, already wired to the same naming and layout.
What it does
Clean architecture brick
bca generates the data, domain and presentation layers for a feature: local and remote data sources, a repository and its implementation, an entity, a use case and its interface, the BLoC with its events and state, and the page.
Screen with BLoC bricks
swb and sbwa generate a lighter feature: the BLoC, a model and a page, for screens that do not need a full domain layer.
One variable
Each brick asks for a single feature name and applies it to every file and folder.
How it is built
- Each brick is a Mason template in its own folder, with a brick.yaml, a changelog, a licence and a readme.
- File and folder names use the feature name as a template variable, so one prompt shapes the whole tree.
- Public on GitHub, so any project can pull the bricks in.
Tech stack
Bricks
- bca: data, domain and presentation layers with BLoC
- swb: screen with BLoC
- sbwa: screen with BLoC, second layout
Tooling
- Dart
- Mason CLI
- BLoC